Class: Nesta::Commands::Theme::Enable
- Inherits:
-
Object
- Object
- Nesta::Commands::Theme::Enable
- Includes:
- Command
- Defined in:
- lib/nesta/commands.rb
Instance Method Summary (collapse)
- - (Object) execute
-
- (Enable) initialize(*args)
constructor
A new instance of Enable.
Methods included from Command
#copy_template, #copy_templates, #fail, #template_root, #update_config_yaml
Constructor Details
- (Enable) initialize(*args)
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
- (Object) execute
290 291 292 |
# File 'lib/nesta/commands.rb', line 290 def execute update_config_yaml(/^\s*#?\s*theme:.*/, "theme: #{@name}") end |