Sha256: 4981339c14759c7ecd385761717db8c411f5f4866ef4c98f5301e38a27ed8aa6

Contents?: true

Size: 370 Bytes

Versions: 2

Compression:

Stored size: 370 Bytes

Contents

module Bright
  class Address < Model
    @attribute_names = [:street, :apt, :city, :state, :postal_code, :latitude, :longitude, :type]
    attr_accessor(*@attribute_names)

    alias_method :lat, :latitude
    alias_method :lng, :longitude

    def geographical_coordinates
      if latitude and longitude
        "#{latitude},#{longitude}"
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
bright-2.1 lib/bright/address.rb
bright-2.0 lib/bright/address.rb