Class: MisterBin::Command
- Inherits:
-
Object
- Object
- MisterBin::Command
- Defined in:
- lib/mister_bin/command.rb
Instance Attribute Summary collapse
-
#command ⇒ Object
readonly
Returns the value of attribute command.
-
#file ⇒ Object
readonly
Returns the value of attribute file.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(command, file) ⇒ Command
constructor
A new instance of Command.
- #run(argv = []) ⇒ Object
Constructor Details
#initialize(command, file) ⇒ Command
Returns a new instance of Command.
5 6 7 8 9 |
# File 'lib/mister_bin/command.rb', line 5 def initialize(command, file) @command = command @file = file @type = command =~ / / ? :secondary : :primary end |
Instance Attribute Details
#command ⇒ Object (readonly)
Returns the value of attribute command.
3 4 5 |
# File 'lib/mister_bin/command.rb', line 3 def command @command end |
#file ⇒ Object (readonly)
Returns the value of attribute file.
3 4 5 |
# File 'lib/mister_bin/command.rb', line 3 def file @file end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
3 4 5 |
# File 'lib/mister_bin/command.rb', line 3 def type @type end |