Class: Zenlight::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/zenlight/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



14
15
16
17
18
19
20
21
# File 'lib/zenlight/configuration.rb', line 14

def initialize
  self.rpm = 700
  self.api_path = "/api/v2"
  self.subdomain = ENV['ZENLIGHT_SUBDOMAIN']
  self.email = ENV['ZENLIGHT_EMAIL']
  self.password = ENV['ZENLIGHT_PASSWORD']
  self.token = ENV['ZENLIGHT_TOKEN']
end

Instance Attribute Details

#api_pathObject

Returns the value of attribute api_path.



6
7
8
# File 'lib/zenlight/configuration.rb', line 6

def api_path
  @api_path
end

#emailObject

Returns the value of attribute email.



11
12
13
# File 'lib/zenlight/configuration.rb', line 11

def email
  @email
end

#passwordObject

Returns the value of attribute password.



12
13
14
# File 'lib/zenlight/configuration.rb', line 12

def password
  @password
end

#rpmObject

Returns the value of attribute rpm.



5
6
7
# File 'lib/zenlight/configuration.rb', line 5

def rpm
  @rpm
end

#subdomainObject

Returns the value of attribute subdomain.



4
5
6
# File 'lib/zenlight/configuration.rb', line 4

def subdomain
  @subdomain
end

#tokenObject

Returns the value of attribute token.



13
14
15
# File 'lib/zenlight/configuration.rb', line 13

def token
  @token
end

#uriObject (readonly)

Returns the value of attribute uri.



3
4
5
# File 'lib/zenlight/configuration.rb', line 3

def uri
  @uri
end

Instance Method Details

#[](value) ⇒ Object



22
23
24
# File 'lib/zenlight/configuration.rb', line 22

def [](value)
  self.public_send(value)
end