Class: Whiskey::Command

Inherits:
Thor
  • Object
show all
Includes:
Thor::Actions
Defined in:
lib/whiskey/command.rb,
lib/whiskey/command/build.rb,
lib/whiskey/command/start_server.rb

Defined Under Namespace

Classes: Build, StartServer

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#valuesObject

Returns the value of attribute values.



11
12
13
# File 'lib/whiskey/command.rb', line 11

def values
  @values
end

Class Method Details

.source_rootObject



13
14
15
# File 'lib/whiskey/command.rb', line 13

def self.source_root
  File.join(File.dirname(__FILE__), "command", "templates")
end

Instance Method Details

#build(name) ⇒ Object



18
19
20
21
# File 'lib/whiskey/command.rb', line 18

def build(name)
  @values = AltStruct.new
  Build.new(self, name).call
end

#server(switch) ⇒ Object



24
25
26
27
28
# File 'lib/whiskey/command.rb', line 24

def server(switch)
  case switch
    when "start" then StartServer.new.call
  end
end