Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module Enumerable
- def inject_with_index(*args, &block)
- enum_for(:each_with_index).inject(*args, &block)
- end
- end
- spots = (data = surfline_data.to_hash)[:spot_name].split(',').inject_with_index(Hash.new) {|hash, (name, i)| hash[name] = data[:spot_url].split(',')[i] }
Add Comment
Please, Sign In to add comment