Method: Fog::DNS::Rage4::Real#initialize

Defined in:
lib/fog/rage4/dns.rb

#initialize(options = {}) ⇒ Real

Returns a new instance of Real.



35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# File 'lib/fog/rage4/dns.rb', line 35

def initialize(options={})
  @rage4_email = options[:rage4_email]
  @rage4_password  = options[:rage4_api_key]
  @connection_options = options[:connection_options] || {}
  if options[:rage4_url]
    uri = URI.parse(options[:rage4_url])
    options[:host]    = uri.host
    options[:port]    = uri.port
    options[:scheme]  = uri.scheme
  end
  @host       = options[:host]        || "secure.rage4.com"
  @persistent = options[:persistent]  || false
  @port       = options[:port]        || 443
  @scheme     = options[:scheme]      || 'https'
  @connection = Fog::XML::Connection.new("#{@scheme}://#{@host}:#{@port}", @persistent, @connection_options)
end