Class: RDO::Postgres::Array::Boolean
- Inherits:
-
RDO::Postgres::Array
- Object
- Array
- RDO::Postgres::Array
- RDO::Postgres::Array::Boolean
- Defined in:
- lib/rdo/postgres/array/boolean.rb
Overview
Ruby handling for boolean[] type in PostgreSQL.
Instance Method Summary collapse
Methods inherited from RDO::Postgres::Array
[], #initialize, parse, #to_a, #to_s
Constructor Details
This class inherits a constructor from RDO::Postgres::Array
Instance Method Details
#format_value(v) ⇒ Object
16 17 18 |
# File 'lib/rdo/postgres/array/boolean.rb', line 16 def format_value(v) (!!v).to_s end |
#parse_value(s) ⇒ Object
12 13 14 |
# File 'lib/rdo/postgres/array/boolean.rb', line 12 def parse_value(s) s[0] == "t" end |