class Ivapi::Client

Public Class Methods

new(options = {}) click to toggle source
# File lib/ivapi/client.rb, line 18
def initialize(options = {})
  # Use options passed in, but fall back to module defaults
  Ivapi::Configuration.each_key do |key|
    instance_variable_set(
      :"@#{key}", options[key] || Ivapi.instance_variable_get(:"@#{key}")
    )
  end
end

Public Instance Methods

account() click to toggle source
# File lib/ivapi/client.rb, line 27
def account
  Ivapi::Client::Account.new(self)
end
hosting(hosting_id = @hosting_id) click to toggle source
# File lib/ivapi/client.rb, line 31
def hosting(hosting_id = @hosting_id)
  Ivapi::Client::Hosting.new(self, hosting_id)
end
same_options?(opts) click to toggle source
# File lib/ivapi/client.rb, line 39
def same_options?(opts)
  opts.hash == options.hash
end
server(server_id = @server_id) click to toggle source
# File lib/ivapi/client.rb, line 35
def server(server_id = @server_id)
  Ivapi::Client::Server.new(self, server_id)
end