Class: Stratify::ITunes::Query

Inherits:
Object
  • Object
show all
Defined in:
lib/stratify-itunes/query.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(library_path, limit = 50) ⇒ Query

Returns a new instance of Query.



8
9
10
11
# File 'lib/stratify-itunes/query.rb', line 8

def initialize(library_path, limit = 50)
  @library_path = library_path
  @limit = limit
end

Instance Attribute Details

#library_pathObject (readonly)

Returns the value of attribute library_path.



6
7
8
# File 'lib/stratify-itunes/query.rb', line 6

def library_path
  @library_path
end

#limitObject (readonly)

Returns the value of attribute limit.



6
7
8
# File 'lib/stratify-itunes/query.rb', line 6

def limit
  @limit
end

Instance Method Details

#activitiesObject



13
14
15
# File 'lib/stratify-itunes/query.rb', line 13

def activities
  recently_played_tracks.map {|track| build_activity_from_raw_data(track)}
end