Pass &:to_f as an argument to collect instead of a block

This commit is contained in:
Erik Michaels-Ober 2014-09-04 01:26:57 +02:00
parent 30995aaa78
commit 3e389a86c6
2 changed files with 5 additions and 2 deletions

View File

@ -30,6 +30,8 @@ GEM
addressable (2.3.6) addressable (2.3.6)
arel (5.0.1.20140414130214) arel (5.0.1.20140414130214)
ast (2.0.0) ast (2.0.0)
astrolabe (1.3.0)
parser (>= 2.2.0.pre.3, < 3.0)
bcrypt (3.1.7) bcrypt (3.1.7)
builder (3.2.2) builder (3.2.2)
coderay (1.1.0) coderay (1.1.0)
@ -147,7 +149,8 @@ GEM
rest-client (1.7.2) rest-client (1.7.2)
mime-types (>= 1.16, < 3.0) mime-types (>= 1.16, < 3.0)
netrc (~> 0.7) netrc (~> 0.7)
rubocop (0.25.0) rubocop (0.26.0)
astrolabe (~> 1.3)
parser (>= 2.2.0.pre.4, < 3.0) parser (>= 2.2.0.pre.4, < 3.0)
powerpack (~> 0.0.6) powerpack (~> 0.0.6)
rainbow (>= 1.99.1, < 3.0) rainbow (>= 1.99.1, < 3.0)

View File

@ -2,6 +2,6 @@ class Address
include Geokit::Geocoders include Geokit::Geocoders
def self.geocode(address) def self.geocode(address)
MultiGeocoder.geocode(address).ll.split(',').collect { |s| s.to_f } MultiGeocoder.geocode(address).ll.split(',').collect(&:to_f)
end end
end end