Class: LaMetric::Frames

Inherits:
Object
  • Object
show all
Defined in:
lib/la_metric/frames.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeFrames

Returns a new instance of Frames.



8
9
10
# File 'lib/la_metric/frames.rb', line 8

def initialize
  @frames = []
end

Instance Attribute Details

#framesObject

Returns the value of attribute frames.



6
7
8
# File 'lib/la_metric/frames.rb', line 6

def frames
  @frames
end

Instance Method Details

#add(frame_data) ⇒ Object



12
13
14
# File 'lib/la_metric/frames.rb', line 12

def add(frame_data)
  @frames << LaMetric::Frame.new(normalize(frame_data))
end

#serializeObject



16
17
18
# File 'lib/la_metric/frames.rb', line 16

def serialize
  { frames: frames }.to_json
end