Class: Yetty::Command
- Inherits:
-
Object
- Object
- Yetty::Command
- Defined in:
- lib/yetty/command.rb
Overview
Abstract command class
Constant Summary collapse
- DEFAULT_CONFIGURATION_FILES =
Default configuration file locations
[ './.yetty', '~/.yetty', '/etc/yetty/config.json' ]
Instance Attribute Summary collapse
-
#arguments ⇒ Array
readonly
Cli arguments.
-
#options ⇒ Hash
readonly
Options.
- #ui ⇒ Ui readonly
Instance Method Summary collapse
-
#execute! ⇒ TrueClass
Execute the command.
-
#initialize(opts, args) ⇒ self
constructor
Build new command instance.
Constructor Details
Instance Attribute Details
#arguments ⇒ Array (readonly)
Returns cli arguments.
10 11 12 |
# File 'lib/yetty/command.rb', line 10 def arguments @arguments end |
#options ⇒ Hash (readonly)
Returns options.
8 9 10 |
# File 'lib/yetty/command.rb', line 8 def @options end |
Instance Method Details
#execute! ⇒ TrueClass
Execute the command
34 35 36 |
# File 'lib/yetty/command.rb', line 34 def execute! raise NotImplementedError end |