Class: Barometer::Data::Geo
- Inherits:
-
Coordinates
- Object
- Coordinates
- Barometer::Data::Geo
- Defined in:
- lib/barometer/data/geo.rb
Instance Method Summary collapse
Methods inherited from Coordinates
Instance Method Details
#merge(other_geo) ⇒ Object
17 18 19 20 |
# File 'lib/barometer/data/geo.rb', line 17 def merge(other_geo) return unless other_geo.is_a?(Data::Geo) Data::Geo.new(merged_attributes(other_geo)) end |
#to_s ⇒ Object
12 13 14 15 |
# File 'lib/barometer/data/geo.rb', line 12 def to_s [address, locality, region, country || country_code]. compact.reject(&:empty?).join(', ') end |