class Sequel::Postgres::PGMultiRange::Creator
Callable object that takes the input string and parses it using Parser.
Attributes
type[R]
The database type to set on the PGMultiRange instances returned.
Public Class Methods
new(type, converter=nil)
click to toggle source
# File lib/sequel/extensions/pg_multirange.rb, line 97 def initialize(type, converter=nil) @type = type @converter = converter end
Public Instance Methods
call(string)
click to toggle source
Parse the string using Parser with the appropriate converter, and return a PGMultiRange with the appropriate database type.
# File lib/sequel/extensions/pg_multirange.rb, line 105 def call(string) PGMultiRange.new(Parser.new(string, @converter).parse, @type) end