Class: NaturalDateExpressionFactory
- Inherits:
-
Object
- Object
- NaturalDateExpressionFactory
- Defined in:
- lib/natural-date/natural_date_expression_factory.rb
Constant Summary collapse
- STEPS =
{}
- EXPRESSION_SPLITTER_STEP =
{}
Instance Method Summary collapse
- #create(expression_string, reference_date) ⇒ Object
-
#initialize(lang) ⇒ NaturalDateExpressionFactory
constructor
A new instance of NaturalDateExpressionFactory.
Constructor Details
#initialize(lang) ⇒ NaturalDateExpressionFactory
Returns a new instance of NaturalDateExpressionFactory.
2 3 4 |
# File 'lib/natural-date/natural_date_expression_factory.rb', line 2 def initialize lang @lang = lang end |
Instance Method Details
#create(expression_string, reference_date) ⇒ Object
9 10 11 |
# File 'lib/natural-date/natural_date_expression_factory.rb', line 9 def create expression_string, reference_date NaturalDateExpression.new(create_data_expression(expression_string, reference_date), reference_date, expression_string) end |