Class: Ghundle::Command::Common
- Inherits:
-
Object
- Object
- Ghundle::Command::Common
- Defined in:
- lib/ghundle/command/common.rb
Overview
Provides the basic interface of a Ghundle command. Includes some helper methods that are available in all command objects.
Inheritors are expected to override the #call instance method, and they will have access to the command-line arguments through the #args method.
Instance Attribute Summary collapse
-
#args ⇒ Object
readonly
Returns the value of attribute args.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(*args) ⇒ Common
constructor
A new instance of Common.
Constructor Details
#initialize(*args) ⇒ Common
Returns a new instance of Common.
19 20 21 |
# File 'lib/ghundle/command/common.rb', line 19 def initialize(*args) @args = args end |
Instance Attribute Details
#args ⇒ Object (readonly)
Returns the value of attribute args.
13 14 15 |
# File 'lib/ghundle/command/common.rb', line 13 def args @args end |
Class Method Details
.call(*args) ⇒ Object
15 16 17 |
# File 'lib/ghundle/command/common.rb', line 15 def self.call(*args) new(*args).call end |