Class: Emendate::MonthDayAnalyzer
- Inherits:
-
Object
- Object
- Emendate::MonthDayAnalyzer
- Includes:
- DateUtils
- Defined in:
- lib/emendate/month_day_analyzer.rb
Instance Attribute Summary collapse
-
#day ⇒ Object
readonly
Returns the value of attribute day.
-
#month ⇒ Object
readonly
Returns the value of attribute month.
-
#warnings ⇒ Object
readonly
Returns the value of attribute warnings.
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(n1, n2, y) ⇒ MonthDayAnalyzer
constructor
A new instance of MonthDayAnalyzer.
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
#initialize(n1, n2, y) ⇒ MonthDayAnalyzer
Returns a new instance of MonthDayAnalyzer.
17 18 19 20 21 22 23 |
# File 'lib/emendate/month_day_analyzer.rb', line 17 def initialize(n1, n2, y) @n1 = n1 @n2 = n2 @y = y @opt = Emendate..ambiguous_month_day @warnings = [] end |
Instance Attribute Details
#day ⇒ Object (readonly)
Returns the value of attribute day.
9 10 11 |
# File 'lib/emendate/month_day_analyzer.rb', line 9 def day @day end |
#month ⇒ Object (readonly)
Returns the value of attribute month.
9 10 11 |
# File 'lib/emendate/month_day_analyzer.rb', line 9 def month @month end |
#warnings ⇒ Object (readonly)
Returns the value of attribute warnings.
9 10 11 |
# File 'lib/emendate/month_day_analyzer.rb', line 9 def warnings @warnings end |
Class Method Details
.call ⇒ Object
12 13 14 |
# File 'lib/emendate/month_day_analyzer.rb', line 12 def call(...) new(...).call end |
Instance Method Details
#call ⇒ Object
25 26 27 28 |
# File 'lib/emendate/month_day_analyzer.rb', line 25 def call analyze self end |