Class: LaMetric::Frames
- Inherits:
-
Object
- Object
- LaMetric::Frames
- Defined in:
- lib/la_metric/frames.rb
Instance Attribute Summary collapse
-
#frames ⇒ Object
Returns the value of attribute frames.
Instance Method Summary collapse
- #add(frame_data) ⇒ Object
-
#initialize ⇒ Frames
constructor
A new instance of Frames.
- #serialize ⇒ Object
Constructor Details
#initialize ⇒ Frames
Returns a new instance of Frames.
8 9 10 |
# File 'lib/la_metric/frames.rb', line 8 def initialize @frames = [] end |
Instance Attribute Details
#frames ⇒ Object
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 |
#serialize ⇒ Object
16 17 18 |
# File 'lib/la_metric/frames.rb', line 16 def serialize { frames: frames }.to_json end |