Pass &:to_f as an argument to collect instead of a block
This commit is contained in:
parent
30995aaa78
commit
3e389a86c6
|
@ -30,6 +30,8 @@ GEM
|
|||
addressable (2.3.6)
|
||||
arel (5.0.1.20140414130214)
|
||||
ast (2.0.0)
|
||||
astrolabe (1.3.0)
|
||||
parser (>= 2.2.0.pre.3, < 3.0)
|
||||
bcrypt (3.1.7)
|
||||
builder (3.2.2)
|
||||
coderay (1.1.0)
|
||||
|
@ -147,7 +149,8 @@ GEM
|
|||
rest-client (1.7.2)
|
||||
mime-types (>= 1.16, < 3.0)
|
||||
netrc (~> 0.7)
|
||||
rubocop (0.25.0)
|
||||
rubocop (0.26.0)
|
||||
astrolabe (~> 1.3)
|
||||
parser (>= 2.2.0.pre.4, < 3.0)
|
||||
powerpack (~> 0.0.6)
|
||||
rainbow (>= 1.99.1, < 3.0)
|
||||
|
|
|
@ -2,6 +2,6 @@ class Address
|
|||
include Geokit::Geocoders
|
||||
|
||||
def self.geocode(address)
|
||||
MultiGeocoder.geocode(address).ll.split(',').collect { |s| s.to_f }
|
||||
MultiGeocoder.geocode(address).ll.split(',').collect(&:to_f)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue