Sha256: b285e89d5473bf3907a9dca742b8c70cd5d2f52646c785e218f2fbba82f96467
Contents?: true
Size: 427 Bytes
Versions: 3
Compression:
Stored size: 427 Bytes
Contents
module HistoricalDating::Api def parser @parser ||= HistoricalDating::Parser.new end def parse(string, options = {}) options = { locale: 'de' }.merge(options) unless options[:locale] == 'de' raise HistoricalDating::Error.new('locale_not_supported', locale: options[:locale]) end result = parser.transform(string) HistoricalDating::Range.new(result[:from], result[:to]) end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
historical_dating-1.4.0 | lib/historical_dating/api.rb |
historical_dating-1.1.0 | lib/historical_dating/api.rb |
historical_dating-1.0.0 | lib/historical_dating/api.rb |