Sha256: f53f4bc8d7351d7ac06fae4382f8a269136b02dc53eaeea81eef1adf7bd2805d
Contents?: true
Size: 428 Bytes
Versions: 5
Compression:
Stored size: 428 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
5 entries across 5 versions & 1 rubygems