Class: Datapimp::Sources::Keen

Inherits:
Base
  • Object
show all
Defined in:
lib/datapimp/sources/keen.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#format, #name, #path, #processed, #raw, #refreshed_at, #scopes, #slug_column

Instance Method Summary collapse

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, options)
  @collection = args.first
  @options    = options.to_mash
end

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



5
6
7
# File 'lib/datapimp/sources/keen.rb', line 5

def options
  @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_sObject



12
13
14
# File 'lib/datapimp/sources/keen.rb', line 12

def to_s
  extraction(@collection)
end