Class: Dev::TargetProcess::Config

Inherits:
Struct
  • Object
show all
Defined in:
lib/firespring_dev_commands/target_process.rb

Overview

Config object for setting top level target process config options

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

Returns a new instance of Config.



20
21
22
23
24
25
26
27
# File 'lib/firespring_dev_commands/target_process.rb', line 20

def initialize
  Dotenv.load(CONFIG_FILE) if File.exist?(CONFIG_FILE)

  self.username = ENV.fetch(TP_USERNAME, nil)
  self.password = ENV.fetch(TP_PASSWORD, nil)
  self.url = ENV.fetch(TP_URL, nil)
  self.http_debug = false
end

Instance Attribute Details

#http_debugObject

Returns the value of attribute http_debug

Returns:

  • (Object)

    the current value of http_debug



19
20
21
# File 'lib/firespring_dev_commands/target_process.rb', line 19

def http_debug
  @http_debug
end

#passwordObject

Returns the value of attribute password

Returns:

  • (Object)

    the current value of password



19
20
21
# File 'lib/firespring_dev_commands/target_process.rb', line 19

def password
  @password
end

#urlObject

Returns the value of attribute url

Returns:

  • (Object)

    the current value of url



19
20
21
# File 'lib/firespring_dev_commands/target_process.rb', line 19

def url
  @url
end

#usernameObject

Returns the value of attribute username

Returns:

  • (Object)

    the current value of username



19
20
21
# File 'lib/firespring_dev_commands/target_process.rb', line 19

def username
  @username
end