Skip to content

Instantly share code, notes, and snippets.

@kopylovvlad
Created May 14, 2017 09:02
Show Gist options
  • Save kopylovvlad/59bd55e6f85a43b97c6fd232531abf80 to your computer and use it in GitHub Desktop.
Save kopylovvlad/59bd55e6f85a43b97c6fd232531abf80 to your computer and use it in GitHub Desktop.
class Latitude
def initialize(value)
@value = value
end
def to_i
@value.to_i
end
end
class Longitude
def initialize(value)
@value = value
end
def to_i
@value.to_i
end
end
class MagicCoordinate
def initialize; end
def to_geo_coordinate
GeoCoordinate.new(magic_latitude, magic_longitude)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment