Class: Veezi::Configuration
- Inherits:
-
Object
- Object
- Veezi::Configuration
- Defined in:
- lib/veezi/configuration.rb
Constant Summary collapse
- REQUIRED_ATTRIUBTES =
%w(api_key endpoint_url)
Instance Attribute Summary collapse
-
#api_key ⇒ Object
Returns the value of attribute api_key.
-
#api_version ⇒ Object
Returns the value of attribute api_version.
-
#content_type ⇒ Object
Returns the value of attribute content_type.
-
#endpoint_url ⇒ Object
Returns the value of attribute endpoint_url.
-
#use_ssl ⇒ Object
Returns the value of attribute use_ssl.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #valid? ⇒ Boolean
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
11 12 13 14 |
# File 'lib/veezi/configuration.rb', line 11 def initialize @api_version ||= "V1" @endpoint_url ||= "api.us.veezi.com" end |
Instance Attribute Details
#api_key ⇒ Object
Returns the value of attribute api_key.
5 6 7 |
# File 'lib/veezi/configuration.rb', line 5 def api_key @api_key end |
#api_version ⇒ Object
Returns the value of attribute api_version.
9 10 11 |
# File 'lib/veezi/configuration.rb', line 9 def api_version @api_version end |
#content_type ⇒ Object
Returns the value of attribute content_type.
8 9 10 |
# File 'lib/veezi/configuration.rb', line 8 def content_type @content_type end |
#endpoint_url ⇒ Object
Returns the value of attribute endpoint_url.
7 8 9 |
# File 'lib/veezi/configuration.rb', line 7 def endpoint_url @endpoint_url end |
#use_ssl ⇒ Object
Returns the value of attribute use_ssl.
6 7 8 |
# File 'lib/veezi/configuration.rb', line 6 def use_ssl @use_ssl end |
Instance Method Details
#valid? ⇒ Boolean
16 17 18 |
# File 'lib/veezi/configuration.rb', line 16 def valid? REQUIRED_ATTRIUBTES.all? { |attribute| !self.send(attribute).nil? } end |