Created
March 18, 2013 18:31
-
-
Save radiospiel/5189562 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
class Movie < ActiveRecord::Base | |
end | |
module Crawler | |
extend self | |
def run | |
html = Net::HTTP.get "..." | |
doc = Nokogiri.HTML(html) | |
doc.css(".movies").each do |movie| | |
Movie.create! :name => "Name" | |
Theater.create! :name => "Name" | |
... | |
end | |
end | |
end | |
class Movie | |
extend Crawler | |
Movie.run | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I always get an "uninitialized constant Movie" Error ...