Module: TimeRangeExtractor

Defined in:
lib/time_range_extractor/parser.rb,
lib/time_range_extractor.rb,
lib/time_range_extractor/version.rb,
lib/time_range_extractor/match_result.rb
more...

Overview

Parse out time values from a string of text. Uses the provided date as the basis for the DateTime generation.

Defined Under Namespace

Classes: Error, MatchResult, Parser

Constant Summary collapse

VERSION =
'0.3.0'

Class Method Summary collapse

Class Method Details

.call(text, date: Date.current) ⇒ Object

[View source]

14
15
16
# File 'lib/time_range_extractor.rb', line 14

def self.call(text, date: Date.current)
  Parser.new(text, date: date).call
end