Module: Powcloud::Insurance::AgentCommunications
- Included in:
- Agent
- Defined in:
- lib/powcloud/insurance/agent_communications.rb
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
- #connect_broadcast(channel_name, type = Comm::AmqpBroadcastChannel) ⇒ Object
- #connect_direct ⇒ Object
-
#start_communications ⇒ Object
Non-blocking.
Instance Method Details
#connect_broadcast(channel_name, type = Comm::AmqpBroadcastChannel) ⇒ Object
20 21 22 |
# File 'lib/powcloud/insurance/agent_communications.rb', line 20 def connect_broadcast(channel_name, type = Comm::AmqpBroadcastChannel) type.new channel_name, logger end |
#connect_direct ⇒ Object
24 25 26 |
# File 'lib/powcloud/insurance/agent_communications.rb', line 24 def connect_direct raise 'Not implemented yet:(' end |
#start_communications ⇒ Object
Non-blocking.
13 14 15 16 17 18 |
# File 'lib/powcloud/insurance/agent_communications.rb', line 13 def start_communications if self.class.class_variable_defined? :@@communications_block block = self.class.send(:class_variable_get, :@@communications_block) instance_eval(&block) if block # TODO: class eval? end end |