Class: Teamlab::Config
- Inherits:
-
Object
- Object
- Teamlab::Config
- Defined in:
- lib/teamlab/config.rb
Instance Attribute Summary collapse
-
#api_additive ⇒ Object
Returns the value of attribute api_additive.
-
#api_path ⇒ Object
Returns the value of attribute api_path.
-
#headers ⇒ Object
Returns the value of attribute headers.
-
#password ⇒ Object
Returns the value of attribute password.
-
#proxy ⇒ Net::HTTP::Proxy
Connection proxy.
-
#server ⇒ Object
Returns the value of attribute server.
-
#token ⇒ Object
Returns the value of attribute token.
-
#username ⇒ Object
Returns the value of attribute username.
Instance Method Summary collapse
- #default_configuration ⇒ Object
-
#initialize(params = {}) ⇒ Config
constructor
A new instance of Config.
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_additive ⇒ Object
Returns the value of attribute api_additive.
23 24 25 |
# File 'lib/teamlab/config.rb', line 23 def api_additive @api_additive end |
#api_path ⇒ Object
Returns the value of attribute api_path.
23 24 25 |
# File 'lib/teamlab/config.rb', line 23 def api_path @api_path end |
#headers ⇒ Object
Returns the value of attribute headers.
23 24 25 |
# File 'lib/teamlab/config.rb', line 23 def headers @headers end |
#password ⇒ Object
Returns the value of attribute password.
23 24 25 |
# File 'lib/teamlab/config.rb', line 23 def password @password end |
#proxy ⇒ Net::HTTP::Proxy
Returns connection proxy.
25 26 27 |
# File 'lib/teamlab/config.rb', line 25 def proxy @proxy end |
#server ⇒ Object
Returns the value of attribute server.
23 24 25 |
# File 'lib/teamlab/config.rb', line 23 def server @server end |
#token ⇒ Object
Returns the value of attribute token.
23 24 25 |
# File 'lib/teamlab/config.rb', line 23 def token @token end |
#username ⇒ Object
Returns the value of attribute username.
23 24 25 |
# File 'lib/teamlab/config.rb', line 23 def username @username end |
Instance Method Details
#default_configuration ⇒ Object
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 |