class Sequel::Postgres::PGMultiRange::Creator

  1. lib/sequel/extensions/pg_multirange.rb
Superclass: Object

Callable object that takes the input string and parses it using Parser.

Methods

Public Class

  1. new

Public Instance

  1. call
  2. type

Attributes

type [R]

The database type to set on the PGMultiRange instances returned.

Public Class methods

new(type, converter=nil)
[show source]
    # File lib/sequel/extensions/pg_multirange.rb
 98 def initialize(type, converter=nil)
 99   @type = type
100   @converter = converter
101 end

Public Instance methods

call(string)

Parse the string using Parser with the appropriate converter, and return a PGMultiRange with the appropriate database type.

[show source]
    # File lib/sequel/extensions/pg_multirange.rb
106 def call(string)
107   PGMultiRange.new(Parser.new(string, @converter).parse, @type)
108 end