Class: AwesomeExplain::Queue::Command
- Inherits:
-
Object
- Object
- AwesomeExplain::Queue::Command
- Defined in:
- lib/awesome_explain/queue/command.rb
Instance Attribute Summary collapse
-
#event ⇒ Object
writeonly
Sets the attribute event.
-
#method_name ⇒ Object
writeonly
Sets the attribute method_name.
-
#object ⇒ Object
writeonly
Sets the attribute object.
Instance Method Summary collapse
-
#initialize(method_name, event, object) ⇒ Command
constructor
A new instance of Command.
- #run ⇒ Object
Constructor Details
#initialize(method_name, event, object) ⇒ Command
Returns a new instance of Command.
7 8 9 10 11 |
# File 'lib/awesome_explain/queue/command.rb', line 7 def initialize(method_name, event, object) @method_name = method_name @event = event @object = object end |
Instance Attribute Details
#event=(value) ⇒ Object (writeonly)
Sets the attribute event
4 5 6 |
# File 'lib/awesome_explain/queue/command.rb', line 4 def event=(value) @event = value end |
#method_name=(value) ⇒ Object (writeonly)
Sets the attribute method_name
3 4 5 |
# File 'lib/awesome_explain/queue/command.rb', line 3 def method_name=(value) @method_name = value end |
#object=(value) ⇒ Object (writeonly)
Sets the attribute object
5 6 7 |
# File 'lib/awesome_explain/queue/command.rb', line 5 def object=(value) @object = value end |
Instance Method Details
#run ⇒ Object
13 14 15 |
# File 'lib/awesome_explain/queue/command.rb', line 13 def run object.send method_name, event end |