Class: Echowrap::Analysis

Inherits:
Base
  • Object
show all
Defined in:
lib/echowrap/analysis.rb

Instance Method Summary collapse

Methods inherited from Base

#==, attr_reader, #attrs, #initialize, #update

Constructor Details

This class inherits a constructor from Echowrap::Base

Instance Method Details

#barsObject



6
7
8
# File 'lib/echowrap/analysis.rb', line 6

def bars
 @bars ||= map_collection(Echowrap::Bar, :bars)
end

#beatsObject



10
11
12
# File 'lib/echowrap/analysis.rb', line 10

def beats
  @beats ||= map_collection(Echowrap::Beat, :beats)
end

#idObject



14
15
16
# File 'lib/echowrap/analysis.rb', line 14

def id
  @attrs[:meta][:timestamp]
end

#metaObject



18
19
20
# File 'lib/echowrap/analysis.rb', line 18

def meta
  @meta ||= Echowrap::Meta.new(@attrs[:meta])
end

#sectionsObject



22
23
24
# File 'lib/echowrap/analysis.rb', line 22

def sections
  @sections ||= map_collection(Echowrap::Section, :sections)
end

#segmentsObject



26
27
28
# File 'lib/echowrap/analysis.rb', line 26

def segments
  @segments ||= map_collection(Echowrap::Segment, :segments)
end

#tatumsObject



30
31
32
# File 'lib/echowrap/analysis.rb', line 30

def tatums
  @tatums ||= map_collection(Echowrap::Tatum, :tatums)
end

#trackObject



34
35
36
# File 'lib/echowrap/analysis.rb', line 34

def track
  @track ||= Echowrap::Track.new(@attrs[:track])
end