Class: StartupStats::Countdb::Client
- Inherits:
-
Object
- Object
- StartupStats::Countdb::Client
- Includes:
- StartupStats::Configurable, Counts, Requestable
- Defined in:
- lib/startupstats/countdb/client.rb
Overview
< StartupStats::Client
Instance Attribute Summary collapse
-
#db_id ⇒ Object
Returns the value of attribute db_id.
Attributes included from StartupStats::Configurable
#access_token, #access_token_key, #connection_options, #endpoint, #middleware
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Client
constructor
A new instance of Client.
Methods included from Counts
#counts_for_day, #counts_for_key, #delete_count, #delete_counts, #increment_key, #increment_key_for_date, #update_key
Methods included from Requestable
Methods included from StartupStats::Configurable
#cache_key, #configure, #credentials?, keys, #reset!
Constructor Details
#initialize(options = {}) ⇒ Client
Returns a new instance of Client.
19 20 21 22 23 24 25 26 27 |
# File 'lib/startupstats/countdb/client.rb', line 19 def initialize( = {} ) # raise StartupStats::Error::ParamsError unless options.has_key?(:db_id) && options[:db_id].match(/^\w+$/) @db_id = ( .has_key?(:db_id) ) ? [:db_id] : nil setup @access_token_key = 'token' StartupStats::Configurable.keys.each do |key| instance_variable_set(:"@#{key}", [key] || instance_variable_get(:"@#{key}")) end end |
Instance Attribute Details
#db_id ⇒ Object
Returns the value of attribute db_id.
11 12 13 |
# File 'lib/startupstats/countdb/client.rb', line 11 def db_id @db_id end |