Class: MagLove::Commands::Base

Inherits:
Thor
  • Object
show all
Includes:
Helper::LogHelper
Defined in:
lib/maglove/commands/base.rb

Direct Known Subclasses

Assets, Fonts, Main, Theme

Instance Method Summary collapse

Methods included from Helper::LogHelper

#debug, #error, #error!, #info, #logger

Constructor Details

#initialize(args, opts, config) ⇒ Base

Returns a new instance of Base.



8
9
10
11
12
13
14
# File 'lib/maglove/commands/base.rb', line 8

def initialize(args, opts, config)
  namespace = self.class.name.split("::").last.underscore
  command = config[:current_command].name
  Logging.mdc["full_command"] = "#{namespace}:#{command}"
  super
  theme.load(options.theme) if options.theme? and options.theme != theme.identifier
end