Class: Mode::Commands::Login

Inherits:
Thor
  • Object
show all
Defined in:
lib/mode/commands/login.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Login

Returns a new instance of Login.



7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/mode/commands/login.rb', line 7

def initialize(options = {})
  @options = options

  if options[:test]
    @environment = :test
  elsif options[:staging]
    @environment = :staging
  elsif options[:development]
    @environment = :development
  else
    @environment = :production
  end
end

Instance Attribute Details

#environmentObject (readonly)

Returns the value of attribute environment.



5
6
7
# File 'lib/mode/commands/login.rb', line 5

def environment
  @environment
end

#optionsObject (readonly)

Returns the value of attribute options.



4
5
6
# File 'lib/mode/commands/login.rb', line 4

def options
  @options
end