-
-
Save anonymous/227bd15ae70c30586b5e8f09e7800188 to your computer and use it in GitHub Desktop.
This file contains 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 Defined as follows... | |
class CraigslistPost < Nokogiri::XML::Element | |
def initialize(html) | |
if html.class != Nokogiri::XML::Element | |
raise 'Must initialize with a Nokogiri XML Element' | |
end | |
super(html.name,html.document) | |
end | |
# Error is as follows | |
[4] pry(main)> row.class | |
=> Nokogiri::XML::Element | |
[5] pry(main)> CraigslistPost.new(row) | |
ArgumentError: wrong number of arguments (1 for 2+) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment