Class: Veezi::Configuration

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

Constant Summary collapse

REQUIRED_ATTRIUBTES =
%w(api_key endpoint_url)

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

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_keyObject

Returns the value of attribute api_key.



5
6
7
# File 'lib/veezi/configuration.rb', line 5

def api_key
  @api_key
end

#api_versionObject

Returns the value of attribute api_version.



9
10
11
# File 'lib/veezi/configuration.rb', line 9

def api_version
  @api_version
end

#content_typeObject

Returns the value of attribute content_type.



8
9
10
# File 'lib/veezi/configuration.rb', line 8

def content_type
  @content_type
end

#endpoint_urlObject

Returns the value of attribute endpoint_url.



7
8
9
# File 'lib/veezi/configuration.rb', line 7

def endpoint_url
  @endpoint_url
end

#use_sslObject

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

Returns:

  • (Boolean)


16
17
18
# File 'lib/veezi/configuration.rb', line 16

def valid?
  REQUIRED_ATTRIUBTES.all? { |attribute| !self.send(attribute).nil? }
end