Class: ActiveRecord::ConnectionAdapters::PostgreSQL::OID::Array
- Defined in:
- lib/arjdbc/postgresql/base/oid.rb
Instance Attribute Summary collapse
-
#subtype ⇒ Object
readonly
Returns the value of attribute subtype.
Instance Method Summary collapse
-
#initialize(subtype) ⇒ Array
constructor
A new instance of Array.
- #type ⇒ Object
- #type_cast(value) ⇒ Object
Methods inherited from Type
Constructor Details
#initialize(subtype) ⇒ Array
Returns a new instance of Array.
140 141 142 |
# File 'lib/arjdbc/postgresql/base/oid.rb', line 140 def initialize(subtype) @subtype = subtype end |
Instance Attribute Details
#subtype ⇒ Object (readonly)
Returns the value of attribute subtype.
139 140 141 |
# File 'lib/arjdbc/postgresql/base/oid.rb', line 139 def subtype @subtype end |
Instance Method Details
#type ⇒ Object
137 |
# File 'lib/arjdbc/postgresql/base/oid.rb', line 137 def type; @subtype.type end |
#type_cast(value) ⇒ Object
144 145 146 147 148 149 150 |
# File 'lib/arjdbc/postgresql/base/oid.rb', line 144 def type_cast(value) if ::String === value ConnectionAdapters::PostgreSQLColumn.string_to_array value, @subtype else value end end |