Class: Consoler::Command
- Inherits:
-
Object
- Object
- Consoler::Command
- Defined in:
- lib/consoler/command.rb
Overview
Consoler command
Basically a named hash
Instance Attribute Summary collapse
-
#action ⇒ Proc
readonly
Action for this command.
-
#command ⇒ String
readonly
Name of the command.
-
#options ⇒ Consoler::Options
readonly
List of all options.
Instance Method Summary collapse
-
#initialize(options) ⇒ Command
constructor
Create a command.
Constructor Details
#initialize(options) ⇒ Command
Create a command
23 24 25 26 27 |
# File 'lib/consoler/command.rb', line 23 def initialize() @command = [:command] @options = [:options] @action = [:action] end |
Instance Attribute Details
#action ⇒ Proc (readonly)
Action for this command
12 13 14 |
# File 'lib/consoler/command.rb', line 12 def action @action end |
#command ⇒ String (readonly)
Name of the command
12 13 14 |
# File 'lib/consoler/command.rb', line 12 def command @command end |
#options ⇒ Consoler::Options (readonly)
List of all options
12 13 14 |
# File 'lib/consoler/command.rb', line 12 def @options end |