Class: Musa::Datasets::P::PtoTimedSerie Private
- Defined in:
- lib/musa-dsl/datasets/p.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Series adapter for P to AbsTimed conversion.
PtoTimedSerie is a Series::Serie that converts a Musa::Datasets::P (point series) into a series of AbsTimed events. It reads the alternating point/duration structure and emits timed events.
This class is created by #to_timed_serie and should not be instantiated directly.
Instance Attribute Summary collapse
-
#base_duration ⇒ Rational
private
Duration unit multiplier.
-
#origin ⇒ P
private
Source point series.
-
#time_start ⇒ Numeric
private
Starting time offset.
Instance Method Summary collapse
-
#initialize(origin, base_duration, time_start) ⇒ PtoTimedSerie
constructor
private
Creates new timed serie adapter.
Constructor Details
#initialize(origin, base_duration, time_start) ⇒ PtoTimedSerie
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Creates new timed serie adapter.
218 219 220 221 222 223 224 225 226 |
# File 'lib/musa-dsl/datasets/p.rb', line 218 def initialize(origin, base_duration, time_start) @origin = origin @base_duration = base_duration @time_start = time_start init mark_as_prototype! end |
Instance Attribute Details
#base_duration ⇒ Rational
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Duration unit multiplier.
234 235 236 |
# File 'lib/musa-dsl/datasets/p.rb', line 234 def base_duration @base_duration end |
#origin ⇒ P
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Source point series.
230 231 232 |
# File 'lib/musa-dsl/datasets/p.rb', line 230 def origin @origin end |
#time_start ⇒ Numeric
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Starting time offset.
238 239 240 |
# File 'lib/musa-dsl/datasets/p.rb', line 238 def time_start @time_start end |