Parent

Methods

Included Modules

Files

Moqueue::MockExchange::TopicBindingKey

Public Class Methods

new(key_string) click to toggle source
     # File lib/moqueue/mock_exchange.rb, line 110
110:       def initialize(key_string)
111:         @key = key_string.to_s.split(".")
112:       end

Public Instance Methods

matches?(message_key) click to toggle source
     # File lib/moqueue/mock_exchange.rb, line 114
114:       def matches?(message_key)
115:         message_key, binding_key = message_key.split("."), key.dup
116: 
117:         match = true
118:         while match 
119:           binding_token, message_token = binding_key.shift, message_key.shift
120:           break if (binding_token.nil? && message_token.nil?) || (binding_token == "#")
121:           match = ((binding_token == message_token) || (binding_token == '*') || (message_token == '*'))
122:         end
123:         match
124:       end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.