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
# c = CSVBuilder.new ['column 1 name', 'column 2 name', 'column 3 name'] | |
# rowdata.each do |r| | |
# special_column = r.boolean ? 'YES' : 'NO' | |
# c.add_row [special_column, r.name, r.date] | |
# end | |
# c.export('optional_filename.csv') | |
class CSVBuilder | |
def initialize(head) | |
if head.is_a?(Array) |
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
class Uri < ActiveRecord::Base | |
belongs_to :job | |
has_many :scrapes | |
def get_request_object options | |
require 'rubygems' | |
require 'typhoeus' | |
request = Typhoeus::Request.new(self.uri, options) |
NewerOlder