Skip to content

Instantly share code, notes, and snippets.

@supaspoida
Created April 22, 2009 23:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save supaspoida/100162 to your computer and use it in GitHub Desktop.
Save supaspoida/100162 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'fastercsv'
class Discover
attr_accessor :data
def initialize(file)
@data = FasterCSV.read(file, :headers => true, :header_converters => :symbol)
end
def find_in_description(text)
@data.each do |row|
puts row if row[:description].include? text
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment