Class: ComposedCommands::CommandFactory
- Inherits:
-
Object
- Object
- ComposedCommands::CommandFactory
- Defined in:
- lib/composed_commands/command_factory.rb
Instance Attribute Summary collapse
-
#command ⇒ Object
readonly
Returns the value of attribute command.
Instance Method Summary collapse
- #create ⇒ Object
-
#initialize(command, options = {}) ⇒ CommandFactory
constructor
A new instance of CommandFactory.
Constructor Details
#initialize(command, options = {}) ⇒ CommandFactory
Returns a new instance of CommandFactory.
4 5 6 7 |
# File 'lib/composed_commands/command_factory.rb', line 4 def initialize(command, = {}) @command = command @options = end |
Instance Attribute Details
#command ⇒ Object (readonly)
Returns the value of attribute command.
3 4 5 |
# File 'lib/composed_commands/command_factory.rb', line 3 def command @command end |
Instance Method Details
#create ⇒ Object
9 10 11 |
# File 'lib/composed_commands/command_factory.rb', line 9 def create @command.new(@options) end |