Class: Shred::Commands::Base
- Inherits:
-
Thor
- Object
- Thor
- Shred::Commands::Base
- Defined in:
- lib/shred/commands/base.rb
Instance Attribute Summary collapse
-
#command_config ⇒ Object
readonly
Returns the value of attribute command_config.
-
#command_name ⇒ Object
readonly
Returns the value of attribute command_name.
-
#console ⇒ Object
readonly
Returns the value of attribute console.
Instance Method Summary collapse
-
#initialize(*args) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(*args) ⇒ Base
Returns a new instance of Base.
136 137 138 139 140 141 142 |
# File 'lib/shred/commands/base.rb', line 136 def initialize(*args) @command_name = args[2][:invocations][Shred::CLI].last @command_config = Shred::CLI.config['commands'][@command_name] @console = Console.new(thor: self) super configure end |
Instance Attribute Details
#command_config ⇒ Object (readonly)
Returns the value of attribute command_config.
134 135 136 |
# File 'lib/shred/commands/base.rb', line 134 def command_config @command_config end |
#command_name ⇒ Object (readonly)
Returns the value of attribute command_name.
134 135 136 |
# File 'lib/shred/commands/base.rb', line 134 def command_name @command_name end |
#console ⇒ Object (readonly)
Returns the value of attribute console.
134 135 136 |
# File 'lib/shred/commands/base.rb', line 134 def console @console end |