module TimeScales::Frame::PartComponents::HasYearOfScheme

Attributes

year[R]
year_of_scheme[R]

Public Class Methods

included(other) click to toggle source
# File lib/time_scales/frame/part_components.rb, line 7
def self.included(other)
  other.extend HasYearOfScheme::ClassMixin
end

Private Instance Methods

_initialize(args_array) click to toggle source
Calls superclass method
# File lib/time_scales/frame/part_components.rb, line 17
def _initialize(args_array)
  super
  @year_of_scheme = ensure_fixnum( args_array.shift )
end
prepare_time_struct(struct) click to toggle source
Calls superclass method
# File lib/time_scales/frame/part_components.rb, line 22
def prepare_time_struct(struct)
  struct.year = (struct.year || 1) + year_of_scheme - 1
  super
end