-
-
Save anonymous/2478c472c1866a8c0b4f2c00705443cf 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
require 'nokogiri' | |
class ChildClass < Nokogiri::XML::Document | |
attr_reader :whatever | |
def initialize(whatever) | |
@whatever = whatever | |
end | |
end | |
ChildClass.new(500) # ==> no implicit conversion of Fixnum into String | |
ChildClass.new('X') # ==> wrong number of arguments (given 0, expected 1) |
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
# This file is part of Nokogiri | |
module Nokogiri | |
module XML | |
class Document < Nokogiri::XML::Node | |
# ... | |
def initialize *args | |
@errors = [] | |
@decorators = [] | |
end | |
# ... | |
end | |
end | |
end |
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
# This file is part of Nokogiri | |
module Nokogiri | |
module XML | |
class Node | |
# ... | |
def initialize name, document | |
# Empty | |
end | |
# ... | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment