Class: Deano::EnvCommand

Inherits:
Command show all
Includes:
FileUtils
Defined in:
lib/deano/commands/env_command.rb

Direct Known Subclasses

ConsoleCommand, StartCommand

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Command

#app_path, #cmd, command, commands, #rm, #rm_r, #template_path

Constructor Details

#initialize(args) ⇒ EnvCommand

Returns a new instance of EnvCommand.



11
12
13
14
15
16
# File 'lib/deano/commands/env_command.rb', line 11

def initialize(args)
  self.args = args
  @app_dir = File.expand_path(FileUtils.pwd)
  self.env = args[1] || "development"
  ENV["RACK_ENV"] = self.env
end

Instance Attribute Details

#argsObject

Returns the value of attribute args.



5
6
7
# File 'lib/deano/commands/env_command.rb', line 5

def args
  @args
end

#envObject

Returns the value of attribute env.



5
6
7
# File 'lib/deano/commands/env_command.rb', line 5

def env
  @env
end

Class Method Details

.inherited(klass) ⇒ Object



7
8
9
# File 'lib/deano/commands/env_command.rb', line 7

def self.inherited(klass)
  Command.inherited(klass)
end