Class: TimeScales::Parts::MonthOfQuarterClass

Inherits:
AbstractPart
  • Object
show all
Includes:
Singleton
Defined in:
lib/time_scales/parts.rb

Instance Method Summary collapse

Methods inherited from AbstractPart

#===, #name, #scale, #subdivision_name, #to_s, #to_time_scales_part

Instance Method Details

#&(time) ⇒ Object



138
139
140
141
# File 'lib/time_scales/parts.rb', line 138

def &(time)
  month_offs = time.month - 1
  ( month_offs % 3 ) + 1
end

#component_mixinObject



135
# File 'lib/time_scales/parts.rb', line 135

def component_mixin ; Frame::PartComponents::HasMonthOfQuarter ; end

#default_for_unit?Boolean

Returns:

  • (Boolean)


134
# File 'lib/time_scales/parts.rb', line 134

def default_for_unit? ; false    ; end

#scheme_scoped_precision_mixinObject



136
# File 'lib/time_scales/parts.rb', line 136

def scheme_scoped_precision_mixin ; Frame::Precisions::HasMonthOfSchemePrecision ; end

#scopeObject



133
# File 'lib/time_scales/parts.rb', line 133

def scope       ; Units::Quarter ; end

#subdivisionObject



132
# File 'lib/time_scales/parts.rb', line 132

def subdivision ; Units::Month   ; end

#symbolObject



131
# File 'lib/time_scales/parts.rb', line 131

def symbol ; :month_of_quarter ; end