Class: Sequent::Generator::Command
- Inherits:
-
Object
- Object
- Sequent::Generator::Command
- Defined in:
- lib/sequent/generator/command.rb
Instance Attribute Summary collapse
-
#attrs ⇒ Object
readonly
Returns the value of attribute attrs.
-
#command ⇒ Object
readonly
Returns the value of attribute command.
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(name, command, attrs) ⇒ Command
constructor
A new instance of Command.
Constructor Details
#initialize(name, command, attrs) ⇒ Command
Returns a new instance of Command.
14 15 16 17 18 |
# File 'lib/sequent/generator/command.rb', line 14 def initialize(name, command, attrs) @name = name @command = command @attrs = attrs.map{|a| a.split(':')} end |
Instance Attribute Details
#attrs ⇒ Object (readonly)
Returns the value of attribute attrs.
12 13 14 |
# File 'lib/sequent/generator/command.rb', line 12 def attrs @attrs end |
#command ⇒ Object (readonly)
Returns the value of attribute command.
12 13 14 |
# File 'lib/sequent/generator/command.rb', line 12 def command @command end |
Instance Method Details
#execute ⇒ Object
20 21 22 23 |
# File 'lib/sequent/generator/command.rb', line 20 def execute ensure_existing_aggregate! add_command_to_aggregate end |