Class: Ginbin::Command
- Inherits:
-
Object
- Object
- Ginbin::Command
- Defined in:
- lib/ginbin/command.rb
Instance Attribute Summary collapse
-
#title ⇒ Object
readonly
Returns the value of attribute title.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(title:, cmd:) ⇒ Command
constructor
A new instance of Command.
Constructor Details
#initialize(title:, cmd:) ⇒ Command
Returns a new instance of Command.
5 6 7 8 |
# File 'lib/ginbin/command.rb', line 5 def initialize(title:, cmd:) @title = title @cmd = cmd end |
Instance Attribute Details
#title ⇒ Object (readonly)
Returns the value of attribute title.
3 4 5 |
# File 'lib/ginbin/command.rb', line 3 def title @title end |
Instance Method Details
#call ⇒ Object
10 11 12 |
# File 'lib/ginbin/command.rb', line 10 def call exec @cmd end |