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, #template_root, #update_config_yaml

Constructor Details

#initialize(name, options = {}) ⇒ Enable

Returns a new instance of Enable.



177
178
179
180
# File 'lib/nesta/commands.rb', line 177

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

Instance Method Details

#executeObject



182
183
184
# File 'lib/nesta/commands.rb', line 182

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