class SqlPostgres::PgWrapper

This PgType is the base class of wrapper types that are merely wrappers around String. Its purpose is to identify the type of String (is it a mac address? An inet address? etc).

Public Class Methods

from_sql(sql) click to toggle source
# File lib/sqlpostgres/PgWrapper.rb, line 13
def from_sql(sql)
  self.new(sql)
end
new(value) click to toggle source
# File lib/sqlpostgres/PgWrapper.rb, line 19
def initialize(value)
  @value = value
end

Public Instance Methods

to_s() click to toggle source
# File lib/sqlpostgres/PgWrapper.rb, line 23
def to_s
  @value
end

Protected Instance Methods

parts() click to toggle source
# File lib/sqlpostgres/PgWrapper.rb, line 29
def parts
  [@value]
end