Class: RDO::Postgres::Array::Numeric
- Inherits:
-
RDO::Postgres::Array
- Object
- Array
- RDO::Postgres::Array
- RDO::Postgres::Array::Numeric
- Defined in:
- lib/rdo/postgres/array/numeric.rb
Overview
Ruby handling for numeric[] 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
18 19 20 |
# File 'lib/rdo/postgres/array/numeric.rb', line 18 def format_value(v) v.to_s end |
#parse_value(s) ⇒ Object
14 15 16 |
# File 'lib/rdo/postgres/array/numeric.rb', line 14 def parse_value(s) BigDecimal.new(s) end |