FILE = File.join(File.dirname(__FILE__), '..', 'activity_exercise_sport.csv')

  WEIGHTS = [130, 155, 180, 205]
...

Ruby CSV to hash

by Chirantan Rajhans, August 24, 2011 04:34, No refactoring, tagged with one-liner, array hash

The part where weight_calor...

18bcc556d7688096bd4daa5d72bd6c32 Talk
#!/usr/bin/env ruby

files = ARGV.collect { |fname| File.new(fname, 'w') }
...

Ruby Randomly split input lines.

by Scott Robinson, November 15, 2007 08:56, 2 refactorings, tagged with functional, short, oneliner, one-liner

My first Ruby script. I'm c...

1945ab4cdb87eaf5a5c906fa884c29f1 Talk