Class: Legion::Transport::Messages::SubTask
- Inherits:
-
Legion::Transport::Message
- Object
- Legion::Transport::Message
- Legion::Transport::Messages::SubTask
- Defined in:
- lib/legion/transport/messages/subtask.rb
Instance Method Summary collapse
Methods inherited from Legion::Transport::Message
#content_encoding, #content_type, #encode_message, #encrypt?, #encrypt_message, #exchange_name, #expiration, #headers, #initialize, #priority, #publish, #routing_key, #timestamp, #type
Methods included from Common
#channel, #channel_open?, #close, #close!, #deep_merge, #generate_consumer_tag, #open_channel, #options_builder
Constructor Details
This class inherits a constructor from Legion::Transport::Message
Instance Method Details
#exchange ⇒ Object
7 8 9 |
# File 'lib/legion/transport/messages/subtask.rb', line 7 def exchange Legion::Transport::Exchanges::Task end |
#message ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/legion/transport/messages/subtask.rb', line 11 def { transformation: @options[:transformation] || '{}', conditions: @options[:conditions] || '{}', results: @options[:results] || '{}' } end |
#validate ⇒ Object
19 20 21 22 23 |
# File 'lib/legion/transport/messages/subtask.rb', line 19 def validate raise TypeError unless @options[:function].is_a? String @valid = true end |