Class: OmfCommon::Comm::Local::Topic
- Defined in:
- lib/omf_common/comm/local/local_topic.rb
Constant Summary collapse
- @@marshall_messages =
true
Instance Attribute Summary
Attributes inherited from Topic
Class Method Summary collapse
-
.marshall_messages=(flag) ⇒ Object
If set to ‘true’ marshall and immediately unmarshall before handing it on messages.
Instance Method Summary collapse
Methods inherited from Topic
[], #after, #configure, create, #create, #create_message_and_publish, #error?, #inform, #on_inform, #on_message, #publish, #release, #request, #unsubscribe
Class Method Details
.marshall_messages=(flag) ⇒ Object
If set to ‘true’ marshall and immediately unmarshall before handing it on messages
16 17 18 |
# File 'lib/omf_common/comm/local/local_topic.rb', line 16 def self.(flag) @@marshall_messages = (flag == true) end |
Instance Method Details
#address ⇒ Object
28 29 30 |
# File 'lib/omf_common/comm/local/local_topic.rb', line 28 def address @id end |
#on_subscribed(&block) ⇒ Object
32 33 34 35 36 37 38 |
# File 'lib/omf_common/comm/local/local_topic.rb', line 32 def on_subscribed(&block) return unless block OmfCommon.eventloop.after(0) do block.arity == 1 ? block.call(self) : block.call end end |
#to_s ⇒ Object
end
24 25 26 |
# File 'lib/omf_common/comm/local/local_topic.rb', line 24 def to_s "Local::Topic<#{id}>" end |