Class: Emendate::MonthAlpha

Inherits:
Segment
  • Object
show all
Includes:
DateUtils
Defined in:
lib/emendate/segment/month_alpha.rb

Instance Method Summary collapse

Methods included from DateUtils

#expand_shorter_digits, #is_range?, #max_season, #min_season, #month_abbr_literal, #month_literal, #possible_range?, #valid_date?, #valid_day?, #valid_month?, #valid_month_or_season?, #valid_season?, #valid_year?

Constructor Details

#initializeMonthAlpha

Returns a new instance of MonthAlpha.



11
12
13
14
15
16
17
18
19
# File 'lib/emendate/segment/month_alpha.rb', line 11

def initialize(...)
  super
  unless type == :month
    raise Emendate::TokenTypeError,
      "MonthAlpha must be created with type = :month"
  end

  @literal = default_literal if default_literal
end