Class: DataMapper::Property::PgArray
- Inherits:
-
Object
- Object
- DataMapper::Property::PgArray
- Defined in:
- lib/dm-pg-types/pg_array.rb
Direct Known Subclasses
Instance Method Summary collapse
Instance Method Details
#dump(value) ⇒ Object
11 12 13 |
# File 'lib/dm-pg-types/pg_array.rb', line 11 def dump(value) "{#{CSV.generate_line(value, :row_sep => '')}}" if value end |
#load(value) ⇒ Object
7 8 9 |
# File 'lib/dm-pg-types/pg_array.rb', line 7 def load(value) CSV.parse_line(value.gsub(/[{}]/,'')) || [] if value end |