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.
410 411 412 413 414 |
# File 'lib/activemessaging/gateway.rb', line 410 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.
408 409 410 |
# File 'lib/activemessaging/gateway.rb', line 408 def broker_name @broker_name end |
#name ⇒ Object
Returns the value of attribute name.
408 409 410 |
# File 'lib/activemessaging/gateway.rb', line 408 def name @name end |
#publish_headers ⇒ Object
Returns the value of attribute publish_headers.
408 409 410 |
# File 'lib/activemessaging/gateway.rb', line 408 def publish_headers @publish_headers end |
#value ⇒ Object
Returns the value of attribute value.
408 409 410 |
# File 'lib/activemessaging/gateway.rb', line 408 def value @value end |
#wildcard ⇒ Object
Returns the value of attribute wildcard.
408 409 410 |
# File 'lib/activemessaging/gateway.rb', line 408 def wildcard @wildcard end |
Instance Method Details
#to_s ⇒ Object
416 417 418 |
# File 'lib/activemessaging/gateway.rb', line 416 def to_s "<destination: #{broker_name} :#{name}=>'#{value}'>" end |