Class: Nesta::Commands::Theme::Enable
- Inherits:
-
Object
- Object
- Nesta::Commands::Theme::Enable
- Includes:
- Command
- Defined in:
- lib/nesta/commands.rb
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(name, options = {}) ⇒ Enable
constructor
A new instance of Enable.
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, = {}) name.nil? && (raise UsageError.new('name not specified')) @name = name end |
Instance Method Details
#execute ⇒ Object
182 183 184 |
# File 'lib/nesta/commands.rb', line 182 def execute update_config_yaml(/^\s*#?\s*theme:.*/, "theme: #{@name}") end |