Class: Shred::Commands::Base

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

Direct Known Subclasses

App, Db, Dotenv, PlatformDeps, RubyDeps, Services, Test

Instance Attribute Summary collapse

Instance Method Summary collapse

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_configObject (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_nameObject (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

#consoleObject (readonly)

Returns the value of attribute console.



134
135
136
# File 'lib/shred/commands/base.rb', line 134

def console
  @console
end