Class: Neighbor::Type::Cube
- Inherits:
-
ActiveRecord::Type::Value
- Object
- ActiveRecord::Type::Value
- Neighbor::Type::Cube
- Defined in:
- lib/neighbor/type/cube.rb
Instance Method Summary collapse
Instance Method Details
#serialize(value) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/neighbor/type/cube.rb', line 8 def serialize(value) if Utils.array?(value) value = value.to_a if value.first.is_a?(Array) value = value.map { |v| serialize_point(v) }.join(", ") else value = serialize_point(value) end end super(value) end |
#type ⇒ Object
4 5 6 |
# File 'lib/neighbor/type/cube.rb', line 4 def type :cube end |