Class: Ivapi::Client
- Inherits:
-
Object
- Object
- Ivapi::Client
- Includes:
- Authentication, Configuration
- Defined in:
- lib/ivapi/client.rb,
lib/ivapi/client/base.rb,
lib/ivapi/client/server.rb,
lib/ivapi/client/account.rb
Defined Under Namespace
Classes: Account, Base, Server
Instance Attribute Summary
Attributes included from Configuration
#api_endpoint, #connection_options, #password, #server_id, #user_agent, #username, #web_endpoint
Instance Method Summary collapse
- #account ⇒ Object
-
#initialize(options = {}) ⇒ Client
constructor
A new instance of Client.
- #same_options?(opts) ⇒ Boolean
- #server(server_id = @server_id) ⇒ Object
Methods included from Configuration
Methods included from Authentication
#authenticated?, #authentication
Constructor Details
#initialize(options = {}) ⇒ Client
Returns a new instance of Client.
15 16 17 18 19 20 21 22 |
# File 'lib/ivapi/client.rb', line 15 def initialize( = {}) # Use options passed in, but fall back to module defaults Ivapi::Configuration.keys.each do |key| instance_variable_set( :"@#{key}", [key] || Ivapi.instance_variable_get(:"@#{key}") ) end end |