Class: Translator::ExpressionSplitter
- Defined in:
- lib/natural-date/translator/expression_splitter.rb
Instance Attribute Summary
Attributes inherited from Step
Instance Method Summary collapse
Instance Method Details
#map(tokens) ⇒ Object
3 4 5 6 7 8 9 10 |
# File 'lib/natural-date/translator/expression_splitter.rb', line 3 def map tokens tokens .lines .map { |l| l.strip } .join(';') .gsub(';', ' ; ') .split(language_bundle.separator_regexp) end |