Class: Regaliator::Configuration

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



6
7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/regaliator/configuration.rb', line 6

def initialize
  @api_key      = nil
  @secret_key   = nil
  @host         = nil
  @version      = nil
  @open_timeout = 10
  @read_timeout = 60
  @use_ssl      = true

  @proxy_host   = nil
  @proxy_port   = nil
  @proxy_user   = nil
  @proxy_pass   = nil
end

Instance Attribute Details

#api_keyObject

Returns the value of attribute api_key.



3
4
5
# File 'lib/regaliator/configuration.rb', line 3

def api_key
  @api_key
end

#hostObject

Returns the value of attribute host.



3
4
5
# File 'lib/regaliator/configuration.rb', line 3

def host
  @host
end

#open_timeoutObject

Returns the value of attribute open_timeout.



3
4
5
# File 'lib/regaliator/configuration.rb', line 3

def open_timeout
  @open_timeout
end

#proxy_hostObject

Returns the value of attribute proxy_host.



3
4
5
# File 'lib/regaliator/configuration.rb', line 3

def proxy_host
  @proxy_host
end

#proxy_passObject

Returns the value of attribute proxy_pass.



3
4
5
# File 'lib/regaliator/configuration.rb', line 3

def proxy_pass
  @proxy_pass
end

#proxy_portObject

Returns the value of attribute proxy_port.



3
4
5
# File 'lib/regaliator/configuration.rb', line 3

def proxy_port
  @proxy_port
end

#proxy_userObject

Returns the value of attribute proxy_user.



3
4
5
# File 'lib/regaliator/configuration.rb', line 3

def proxy_user
  @proxy_user
end

#read_timeoutObject

Returns the value of attribute read_timeout.



3
4
5
# File 'lib/regaliator/configuration.rb', line 3

def read_timeout
  @read_timeout
end

#secret_keyObject

Returns the value of attribute secret_key.



3
4
5
# File 'lib/regaliator/configuration.rb', line 3

def secret_key
  @secret_key
end

#use_sslObject

Returns the value of attribute use_ssl.



3
4
5
# File 'lib/regaliator/configuration.rb', line 3

def use_ssl
  @use_ssl
end

#versionObject

Returns the value of attribute version.



3
4
5
# File 'lib/regaliator/configuration.rb', line 3

def version
  @version
end

Instance Method Details

#secure?Boolean

Returns:

  • (Boolean)


21
22
23
# File 'lib/regaliator/configuration.rb', line 21

def secure?
  use_ssl == true
end