Class: Bubbles::RestEnvironment
- Inherits:
-
Object
- Object
- Bubbles::RestEnvironment
- Defined in:
- lib/bubbles/rest_environment.rb
Instance Attribute Summary collapse
-
#api_key ⇒ Object
Returns the value of attribute api_key.
-
#host ⇒ Object
Returns the value of attribute host.
-
#port ⇒ Object
Returns the value of attribute port.
-
#scheme ⇒ Object
Returns the value of attribute scheme.
Instance Method Summary collapse
-
#initialize(scheme = 'https', host = 'api.foamfactory.com', port = 443, api_key = nil) ⇒ RestEnvironment
constructor
Construct a new instance of
RestEnvironment.
Constructor Details
#initialize(scheme = 'https', host = 'api.foamfactory.com', port = 443, api_key = nil) ⇒ RestEnvironment
Construct a new instance of RestEnvironment.
13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/bubbles/rest_environment.rb', line 13 def initialize(scheme='https', host='api.foamfactory.com', port=443, api_key=nil) @scheme = scheme @port = port if @scheme == 'http' && @port == 443 @port = 80 end @host = host @api_key = api_key end |
Instance Attribute Details
#api_key ⇒ Object
Returns the value of attribute api_key.
3 4 5 |
# File 'lib/bubbles/rest_environment.rb', line 3 def api_key @api_key end |
#host ⇒ Object
Returns the value of attribute host.
3 4 5 |
# File 'lib/bubbles/rest_environment.rb', line 3 def host @host end |
#port ⇒ Object
Returns the value of attribute port.
3 4 5 |
# File 'lib/bubbles/rest_environment.rb', line 3 def port @port end |
#scheme ⇒ Object
Returns the value of attribute scheme.
3 4 5 |
# File 'lib/bubbles/rest_environment.rb', line 3 def scheme @scheme end |