class Agave::Local::FieldType::LatLon

Attributes

latitude[R]
longitude[R]

Public Class Methods

new(latitude, longitude) click to toggle source
# File lib/agave/local/field_type/lat_lon.rb, line 12
def initialize(latitude, longitude)
  @latitude = latitude
  @longitude = longitude
end
parse(value, _repo) click to toggle source
# File lib/agave/local/field_type/lat_lon.rb, line 8
def self.parse(value, _repo)
  value && new(value[:latitude], value[:longitude])
end

Public Instance Methods

to_hash(*_args) click to toggle source
# File lib/agave/local/field_type/lat_lon.rb, line 21
def to_hash(*_args)
  {
    latitude: latitude,
    longitude: longitude
  }
end
values() click to toggle source
# File lib/agave/local/field_type/lat_lon.rb, line 17
def values
  [latitude, longitude]
end