Sha256: e89031c374ab9bd77e23f09cdad30a56e4a5ad0ec1705f00c59813889967a45c

Contents?: true

Size: 414 Bytes

Versions: 2

Compression:

Stored size: 414 Bytes

Contents

# frozen_string_literal: true

module Armg
  class MysqlGeometry < ActiveModel::Type::Value
    def type
      :geometry
    end

    def deserialize(value)
      if value.is_a?(::String)
        Armg.deserializer.deserialize(value)
      else
        value
      end
    end

    def serialize(value)
      if value.nil?
        nil
      else
        Armg.serializer.serialize(value)
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
armg-0.8.0 lib/armg/mysql_geometry.rb
armg-0.7.2 lib/armg/mysql_geometry.rb