Module: Legion::Extensions::Transport::AutoBuild
- Defined in:
- lib/legion/extensions/transport/autobuild.rb
Instance Method Summary collapse
- #bind(from, to, options = {}) ⇒ Object
- #build ⇒ Object
- #build_e_to_e ⇒ Object
- #build_e_to_q ⇒ Object
- #e_to_e ⇒ Object
- #e_to_q ⇒ Object
- #require_exchanges ⇒ Object
- #require_queues ⇒ Object
Instance Method Details
#bind(from, to, options = {}) ⇒ Object
30 31 32 33 34 35 |
# File 'lib/legion/extensions/transport/autobuild.rb', line 30 def bind(from, to, = {}) from = from.new to = to.new to.bind(from, routing_key: [:routing_key]) unless [:routing_key].nil? to.bind(from) if [:routing_key].nil? end |
#build ⇒ Object
5 6 7 8 |
# File 'lib/legion/extensions/transport/autobuild.rb', line 5 def build build_e_to_e build_e_to_q end |
#build_e_to_e ⇒ Object
22 23 24 25 26 27 28 |
# File 'lib/legion/extensions/transport/autobuild.rb', line 22 def build_e_to_e e_to_e.each do |binding| = {} [:routing_key] = binding[:routing_key] unless binding[:routing_key].nil? bind(binding[:from], binding[:to], ) end end |
#build_e_to_q ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/legion/extensions/transport/autobuild.rb', line 14 def build_e_to_q e_to_q.each do |binding| = {} [:routing_key] = binding[:routing_key] unless binding[:routing_key].nil? bind(binding[:from], binding[:to], ) end end |
#e_to_e ⇒ Object
41 42 43 |
# File 'lib/legion/extensions/transport/autobuild.rb', line 41 def e_to_e [] end |
#e_to_q ⇒ Object
37 38 39 |
# File 'lib/legion/extensions/transport/autobuild.rb', line 37 def e_to_q [] end |
#require_exchanges ⇒ Object
10 |
# File 'lib/legion/extensions/transport/autobuild.rb', line 10 def require_exchanges; end |
#require_queues ⇒ Object
12 |
# File 'lib/legion/extensions/transport/autobuild.rb', line 12 def require_queues; end |