Created
April 22, 2009 23:21
-
-
Save supaspoida/100162 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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