1 2 3 4
def translation_links lang = [ %w[en english us], ...
Ruby nested array to set of html...
i have a simple array that ...
1 2 3 4
FIELDS = [ 'first', 'last', 'band' ] DATA = [['Kurt', 'Cobain', 'Nirvana'], ['Jimi', 'Page', 'Led Zeppelin'], ...
Ruby Map fields array and data a...
First posting here. I just ...
1 2 3
artists = [1, 2, 3] column_1 = artists[0..artists.size/2] column_2 = artists[artists.size/2+1..artists.size]
Ruby Split an array into half
The example works if the ar...
1 2 3 4
times.each do |time| events.each do |event| if time.strftime("%I:%M %p") == event.datetime.strftime("%I:%M %p") ...
Ruby two for loops cleanup?
times is an array of dateti...
1 2 3 4
module Enumerable def cluster sort.inject([[]]) do |out, n| ...
Ruby Enumerable#cluster
%w[app noot app mies zoo m...
1 2 3 4
xml = REXML::Document.new(data) artists = [] ...
Ruby cleaner way to limit result...
by timmyvontrimble.myopenid.com,
July 14, 2008 19:12,
9 refactorings, tagged with rails, xml, array, iteration, ruby
Wow! All of these refactori...
i have a simple browser det...