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.
399 400 401 402 403 |
# File 'lib/activemessaging/gateway.rb', line 399 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.
397 398 399 |
# File 'lib/activemessaging/gateway.rb', line 397 def broker_name @broker_name end |
#name ⇒ Object
Returns the value of attribute name.
397 398 399 |
# File 'lib/activemessaging/gateway.rb', line 397 def name @name end |
#publish_headers ⇒ Object
Returns the value of attribute publish_headers.
397 398 399 |
# File 'lib/activemessaging/gateway.rb', line 397 def publish_headers @publish_headers end |
#value ⇒ Object
Returns the value of attribute value.
397 398 399 |
# File 'lib/activemessaging/gateway.rb', line 397 def value @value end |
#wildcard ⇒ Object
Returns the value of attribute wildcard.
397 398 399 |
# File 'lib/activemessaging/gateway.rb', line 397 def wildcard @wildcard end |
Instance Method Details
#to_s ⇒ Object
405 406 407 |
# File 'lib/activemessaging/gateway.rb', line 405 def to_s "<destination: #{broker_name} :#{name}=>'#{value}'>" end |