Class: FlameChannelParser::Segments::ConstantExtrapolate

Inherits:
LinearSegment show all
Defined in:
lib/segments.rb

Overview

This segment does extrapolation using a constant value

Direct Known Subclasses

LinearExtrapolate

Constant Summary

Constants inherited from ConstantSegment

FlameChannelParser::Segments::ConstantSegment::NEG_INF, FlameChannelParser::Segments::ConstantSegment::POS_INF

Instance Attribute Summary

Attributes inherited from ConstantSegment

#end_frame, #start_frame

Instance Method Summary collapse

Methods inherited from ConstantSegment

#defines?

Constructor Details

#initialize(from_frame, base_value) ⇒ ConstantExtrapolate

:nodoc:



215
216
217
218
219
# File 'lib/segments.rb', line 215

def initialize(from_frame, base_value)
  @start_frame = from_frame
  @base_value = base_value
  @end_frame = POS_INF
end

Instance Method Details

#value_at(frame) ⇒ Object



221
222
223
# File 'lib/segments.rb', line 221

def value_at(frame)
  @base_value
end