Module: Legion::Extensions::Helpers::Transport
Instance Method Summary
collapse
Methods included from Base
#actor_class, #actor_const, #actor_name, #calling_class, #calling_class_array, #from_json, #full_path, #lex_class, #lex_const, #lex_name, #normalize, #runner_class, #runner_const, #runner_name, #to_dotted_hash
Instance Method Details
#build_default_exchange ⇒ Object
33
34
35
36
37
38
39
40
|
# File 'lib/legion/extensions/helpers/transport.rb', line 33
def build_default_exchange
exchange = "#{transport_class}::Exchanges::#{lex_const}"
return Object.const_get(exchange) if transport_class::Exchanges.const_defined? lex_const
transport_class::Exchanges.const_set(lex_const, Class.new(Legion::Transport::Exchange))
@default_exchange = Kernel.const_get(exchange)
@default_exchange
end
|
#default_exchange ⇒ Object
29
30
31
|
# File 'lib/legion/extensions/helpers/transport.rb', line 29
def default_exchange
@default_exchange ||= build_default_exchange
end
|
#exchanges ⇒ Object
25
26
27
|
# File 'lib/legion/extensions/helpers/transport.rb', line 25
def exchanges
@exchanges ||= transport_class::Exchanges
end
|
#messages ⇒ Object
17
18
19
|
# File 'lib/legion/extensions/helpers/transport.rb', line 17
def messages
@messages ||= transport_class::Messages
end
|
#queues ⇒ Object
21
22
23
|
# File 'lib/legion/extensions/helpers/transport.rb', line 21
def queues
@queues ||= transport_class::Queues
end
|
#transport_class ⇒ Object
13
14
15
|
# File 'lib/legion/extensions/helpers/transport.rb', line 13
def transport_class
@transport_class ||= lex_class::Transport
end
|
#transport_path ⇒ Object
9
10
11
|
# File 'lib/legion/extensions/helpers/transport.rb', line 9
def transport_path
@transport_path ||= "#{full_path}/transport"
end
|