Class: Shred::Commands::Base

Inherits:
Thor
  • Object
show all
Defined in:
lib/shred/commands/base.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ Base

Returns a new instance of Base.



141
142
143
144
145
146
147
# File 'lib/shred/commands/base.rb', line 141

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_configObject (readonly)

Returns the value of attribute command_config.



139
140
141
# File 'lib/shred/commands/base.rb', line 139

def command_config
  @command_config
end

#command_nameObject (readonly)

Returns the value of attribute command_name.



139
140
141
# File 'lib/shred/commands/base.rb', line 139

def command_name
  @command_name
end

#consoleObject (readonly)

Returns the value of attribute console.



139
140
141
# File 'lib/shred/commands/base.rb', line 139

def console
  @console
end