Class: Teamlab::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/teamlab/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params = {}) ⇒ Config

Returns a new instance of Config.



27
28
29
30
31
32
# File 'lib/teamlab/config.rb', line 27

def initialize(params = {})
  default_configuration
  @server = params[:server]
  @username = params[:username]
  @password = params[:password]
end

Instance Attribute Details

#api_additiveObject

Returns the value of attribute api_additive.



23
24
25
# File 'lib/teamlab/config.rb', line 23

def api_additive
  @api_additive
end

#api_pathObject

Returns the value of attribute api_path.



23
24
25
# File 'lib/teamlab/config.rb', line 23

def api_path
  @api_path
end

#headersObject

Returns the value of attribute headers.



23
24
25
# File 'lib/teamlab/config.rb', line 23

def headers
  @headers
end

#passwordObject

Returns the value of attribute password.



23
24
25
# File 'lib/teamlab/config.rb', line 23

def password
  @password
end

#proxyNet::HTTP::Proxy

Returns connection proxy.

Returns:

  • (Net::HTTP::Proxy)

    connection proxy



25
26
27
# File 'lib/teamlab/config.rb', line 25

def proxy
  @proxy
end

#serverObject

Returns the value of attribute server.



23
24
25
# File 'lib/teamlab/config.rb', line 23

def server
  @server
end

#tokenObject

Returns the value of attribute token.



23
24
25
# File 'lib/teamlab/config.rb', line 23

def token
  @token
end

#usernameObject

Returns the value of attribute username.



23
24
25
# File 'lib/teamlab/config.rb', line 23

def username
  @username
end

Instance Method Details

#default_configurationObject



34
35
36
37
38
39
40
# File 'lib/teamlab/config.rb', line 34

def default_configuration
  @server = 'https://onlyoffice.com'
  @api_path = '/api/2.0/'
  @api_additive = ''
  @username = 'user'
  @password = 'password'
end