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(*args) ⇒ Enable
constructor
A new instance of Enable.
Methods included from Command
#copy_template, #copy_templates, #fail, #template_root, #update_config_yaml
Constructor Details
#initialize(*args) ⇒ Enable
Returns a new instance of Enable.
283 284 285 286 287 288 |
# File 'lib/nesta/commands.rb', line 283 def initialize(*args) name = args.shift = args.shift || {} name.nil? && (raise UsageError.new('name not specified')) @name = name end |
Instance Method Details
#execute ⇒ Object
290 291 292 |
# File 'lib/nesta/commands.rb', line 290 def execute update_config_yaml(/^\s*#?\s*theme:.*/, "theme: #{@name}") end |