Class: ActiveMessaging::Destination
- Inherits:
-
Object
- Object
- ActiveMessaging::Destination
- Defined in:
- lib/activemessaging/gateway.rb
Constant Summary collapse
- DEFAULT_PUBLISH_HEADERS =
{ :persistent=>true }
Instance Attribute Summary collapse
-
#broker_name ⇒ Object
Returns the value of attribute broker_name.
-
#name ⇒ Object
Returns the value of attribute name.
-
#publish_headers ⇒ Object
Returns the value of attribute publish_headers.
-
#value ⇒ Object
Returns the value of attribute value.
-
#wildcard ⇒ Object
Returns the value of attribute wildcard.
Instance Method Summary collapse
-
#initialize(name, value, publish_headers, broker_name) ⇒ Destination
constructor
A new instance of Destination.
- #to_s ⇒ Object
Constructor Details
#initialize(name, value, publish_headers, broker_name) ⇒ Destination
Returns a new instance of Destination.
406 407 408 409 410 |
# File 'lib/activemessaging/gateway.rb', line 406 def initialize(name, value, publish_headers, broker_name) @name, @value, @publish_headers, @broker_name = name, value, publish_headers, broker_name @publish_headers.reverse_merge! DEFAULT_PUBLISH_HEADERS @wildcard = wildcard_match_exp_for(value) if (value =~ /\*/) end |
Instance Attribute Details
#broker_name ⇒ Object
Returns the value of attribute broker_name.
404 405 406 |
# File 'lib/activemessaging/gateway.rb', line 404 def broker_name @broker_name end |
#name ⇒ Object
Returns the value of attribute name.
404 405 406 |
# File 'lib/activemessaging/gateway.rb', line 404 def name @name end |
#publish_headers ⇒ Object
Returns the value of attribute publish_headers.
404 405 406 |
# File 'lib/activemessaging/gateway.rb', line 404 def publish_headers @publish_headers end |
#value ⇒ Object
Returns the value of attribute value.
404 405 406 |
# File 'lib/activemessaging/gateway.rb', line 404 def value @value end |
#wildcard ⇒ Object
Returns the value of attribute wildcard.
404 405 406 |
# File 'lib/activemessaging/gateway.rb', line 404 def wildcard @wildcard end |
Instance Method Details
#to_s ⇒ Object
412 413 414 |
# File 'lib/activemessaging/gateway.rb', line 412 def to_s "<destination: #{broker_name} :#{name}=>'#{value}'>" end |