Class: Qubell::Configuration

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

Overview

Store configuration settings

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



20
21
22
23
# File 'lib/qubell/configuration.rb', line 20

def initialize
  @domain = 'https://express.tonomi.com'
  @api_version = '1'
end

Instance Attribute Details

#api_versionObject

Returns the value of attribute api_version.



17
18
19
# File 'lib/qubell/configuration.rb', line 17

def api_version
  @api_version
end

#domainObject

Returns the value of attribute domain.



17
18
19
# File 'lib/qubell/configuration.rb', line 17

def domain
  @domain
end

#endpointObject (readonly)

Returns the value of attribute endpoint.



18
19
20
# File 'lib/qubell/configuration.rb', line 18

def endpoint
  @endpoint
end

#passwordObject

Returns the value of attribute password.



17
18
19
# File 'lib/qubell/configuration.rb', line 17

def password
  @password
end

#usernameObject

Returns the value of attribute username.



17
18
19
# File 'lib/qubell/configuration.rb', line 17

def username
  @username
end

Instance Method Details

#to_sObject



29
30
31
32
# File 'lib/qubell/configuration.rb', line 29

def to_s
  %({"domain": "#{@domain}","api_version": "#{@api_version}",) +
    %("username": "#{@username}","password": "#{@password}"})
end