Skip to content
Browse files

Options reader for api client.

  • Loading branch information...
1 parent 31fa2e8 commit 7ce23ce5455daef59d2b6e814fd64a18be417aaa Andrew Kirilenko committed Apr 24, 2012
Showing with 13 additions and 0 deletions.
  1. +13 −0 lib/iron_worker_ng/api_client.rb
View
13 lib/iron_worker_ng/api_client.rb
@@ -17,6 +17,8 @@ class APIClient
attr_accessor :api_version
attr_accessor :user_agent
+ attr_reader :options
+
def initialize(options = {})
load_from_hash(options)
load_from_config(options[:config_file] || options['config_file'])
@@ -31,6 +33,17 @@ def initialize(options = {})
raise 'Both iron.io token and project_id must be specified'
end
+ @options = {
+ :token => @token,
+ :project_id => @project_id,
+
+ :scheme => @scheme,
+ :host => @host,
+ :port => @port,
+ :api_version => @api_version,
+ :user_agent => @user_agent
+ }
+
@rest = Rest::Client.new
end

0 comments on commit 7ce23ce

Please sign in to comment.
Something went wrong with that request. Please try again.