Class: Datapimp::Sources::Keen
- Defined in:
- lib/datapimp/sources/keen.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Attributes inherited from Base
#format, #name, #path, #processed, #raw, #refreshed_at, #scopes, #slug_column
Instance Method Summary collapse
- #extraction(event_collection) ⇒ Object
-
#initialize(args, options) ⇒ Keen
constructor
A new instance of Keen.
- #to_s ⇒ Object
Methods inherited from Base
#age, #compute_properties, #data, #ensure_valid_options!, #fetch, #file, #fresh_on_server?, #has_scope?, #jsonify, #max_age, #need_to_refresh?, #path_to_file, #persisted?, #preprocess, #process, #processors, #refresh, #refresh!, #refresh_if_stale?, requires, #save_to_disk, #scope, #select, #stale?
Constructor Details
#initialize(args, options) ⇒ Keen
Returns a new instance of Keen.
7 8 9 10 |
# File 'lib/datapimp/sources/keen.rb', line 7 def initialize(args, ) @collection = args.first @options = .to_mash end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
5 6 7 |
# File 'lib/datapimp/sources/keen.rb', line 5 def @options end |
Instance Method Details
#extraction(event_collection) ⇒ Object
16 17 18 |
# File 'lib/datapimp/sources/keen.rb', line 16 def extraction(event_collection) jsonify(client.extraction(event_collection)) end |
#to_s ⇒ Object
12 13 14 |
# File 'lib/datapimp/sources/keen.rb', line 12 def to_s extraction(@collection) end |