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

Inherits:
Object
  • Object
show all
Defined in:
lib/nesta/commands/theme/enable.rb

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ Enable

Returns a new instance of Enable.



7
8
9
10
11
12
# File 'lib/nesta/commands/theme/enable.rb', line 7

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

Instance Method Details

#execute(process) ⇒ Object



14
15
16
# File 'lib/nesta/commands/theme/enable.rb', line 14

def execute(process)
  Nesta::ConfigFile.new.set_value('theme', @name)
end