Class: Nesta::Commands::Theme::Enable

Inherits:
Object
  • Object
show all
Includes:
Command
Defined in:
lib/nesta/commands.rb

Instance Method Summary (collapse)

Methods included from Command

#copy_template, #copy_templates, #fail, #run_process, #template_root, #update_config_yaml

Constructor Details

- (Enable) initialize(*args)



298
299
300
301
302
303
# File 'lib/nesta/commands.rb', line 298

def initialize(*args)
  name = args.shift
  options = args.shift || {}
  name.nil? && (raise UsageError.new('name not specified'))
  @name = name
end

Instance Method Details

- (Object) execute



305
306
307
# File 'lib/nesta/commands.rb', line 305

def execute
  update_config_yaml(/^\s*#?\s*theme:.*/, "theme: #{@name}")
end