Class: TimeScales::Frame::SchemeRelativeFrame

Inherits:
Base
  • Object
show all
Defined in:
lib/time_scales/frame/scheme_relative_frame.rb

Instance Method Summary collapse

Methods inherited from Base

&, #==, #eql?, #hash, #initialize, outer_scope, #outer_scope, #parts, parts, #precision, precision, #to_a, #to_time_scales_frame, #type

Constructor Details

This class inherits a constructor from TimeScales::Frame::Base

Instance Method Details

#begin_timeObject Also known as: to_time



9
10
11
# File 'lib/time_scales/frame/scheme_relative_frame.rb', line 9

def begin_time
  @begin_time ||= Time.new( *begin_time_struct.to_a )
end

#succ_begin_timeObject

Raises:

  • (NotImplementedError)


15
16
17
# File 'lib/time_scales/frame/scheme_relative_frame.rb', line 15

def succ_begin_time
  raise NotImplementedError, "Subclass responsibility"
end

#to_rangeObject



5
6
7
# File 'lib/time_scales/frame/scheme_relative_frame.rb', line 5

def to_range
  @to_range ||= ( begin_time...succ_begin_time )
end