lib/faker/address.rb in faker19-1.0.1 vs lib/faker/address.rb in faker19-1.0.2

- old
+ new

@@ -36,9 +36,17 @@ def city_prefix; fetch('address.city_prefix'); end def state_abbr; fetch('address.state_abbr'); end def state; fetch('address.state'); end def country; fetch('address.country'); end + def latitude + ((rand * 180) - 90).to_s + end + + def longitude + ((rand * 360) - 180).to_s + end + # You can add whatever you want to the locale file, and it will get # caught here... e.g., create a country_code array in your locale, # then you can call #country_code and it will act like #country def method_missing(m, *args, &block) # Use the alternate form of translate to get a nil rather than a "missing translation" string \ No newline at end of file