Class: NaturalDateExpression::DateMatch
- Inherits:
-
Object
- Object
- NaturalDateExpression::DateMatch
- Defined in:
- lib/natural-date/natural_date_expression.rb
Instance Attribute Summary collapse
-
#first_matched_expression ⇒ Object
readonly
Returns the value of attribute first_matched_expression.
-
#reference_date ⇒ Object
readonly
Returns the value of attribute reference_date.
-
#tested_date ⇒ Object
readonly
Returns the value of attribute tested_date.
Instance Method Summary collapse
-
#initialize(match, first_matched_expression, tested_date, reference_date) ⇒ DateMatch
constructor
A new instance of DateMatch.
- #matches? ⇒ Boolean
Constructor Details
#initialize(match, first_matched_expression, tested_date, reference_date) ⇒ DateMatch
Returns a new instance of DateMatch.
7 8 9 10 11 12 |
# File 'lib/natural-date/natural_date_expression.rb', line 7 def initialize match, first_matched_expression, tested_date, reference_date @match = match @first_matched_expression = first_matched_expression @tested_date = tested_date @reference_date = reference_date end |
Instance Attribute Details
#first_matched_expression ⇒ Object (readonly)
Returns the value of attribute first_matched_expression.
5 6 7 |
# File 'lib/natural-date/natural_date_expression.rb', line 5 def first_matched_expression @first_matched_expression end |
#reference_date ⇒ Object (readonly)
Returns the value of attribute reference_date.
5 6 7 |
# File 'lib/natural-date/natural_date_expression.rb', line 5 def reference_date @reference_date end |
#tested_date ⇒ Object (readonly)
Returns the value of attribute tested_date.
5 6 7 |
# File 'lib/natural-date/natural_date_expression.rb', line 5 def tested_date @tested_date end |
Instance Method Details
#matches? ⇒ Boolean
14 15 16 |
# File 'lib/natural-date/natural_date_expression.rb', line 14 def matches? @match end |