Class: SqlPostgres::PgWrapper
- Defined in:
- lib/sqlpostgres/PgWrapper.rb
Overview
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).
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(value) ⇒ PgWrapper
constructor
A new instance of PgWrapper.
- #to_s ⇒ Object
Methods inherited from PgType
Constructor Details
#initialize(value) ⇒ PgWrapper
Returns a new instance of PgWrapper.
19 20 21 |
# File 'lib/sqlpostgres/PgWrapper.rb', line 19 def initialize(value) @value = value end |
Class Method Details
.from_sql(sql) ⇒ Object
13 14 15 |
# File 'lib/sqlpostgres/PgWrapper.rb', line 13 def from_sql(sql) self.new(sql) end |
Instance Method Details
#to_s ⇒ Object
23 24 25 |
# File 'lib/sqlpostgres/PgWrapper.rb', line 23 def to_s @value end |