Skip to content

Commit

Permalink
Use argument forwarding in HTML4 module
Browse files Browse the repository at this point in the history
  • Loading branch information
MattJones committed Nov 14, 2024
1 parent 141d3bc commit bcd7cf9
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions lib/nokogiri/html4.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,9 @@

module Nokogiri
class << self
# :call-seq:
# HTML4(input, url = nil, encoding = nil, options = XML::ParseOptions::DEFAULT_HTML, &block) → Nokogiri::HTML4::Document
#
# Parse HTML. Convenience method for Nokogiri::HTML4::Document.parse
def HTML4(input, url = nil, encoding = nil, options = XML::ParseOptions::DEFAULT_HTML, &block)
Nokogiri::HTML4::Document.parse(input, url, encoding, options, &block)
def HTML4(...)
Nokogiri::HTML4::Document.parse(...)
end
end

Expand All @@ -20,14 +17,14 @@ module HTML4
class << self
###
# Parse HTML. Convenience method for Nokogiri::HTML4::Document.parse
def parse(input, url = nil, encoding = nil, options = XML::ParseOptions::DEFAULT_HTML, &block)
Document.parse(input, url, encoding, options, &block)
def parse(...)
Document.parse(...)
end

####
# Parse a fragment from +string+ in to a NodeSet.
def fragment(string, encoding = nil, options = XML::ParseOptions::DEFAULT_HTML, &block)
HTML4::DocumentFragment.parse(string, encoding, options, &block)
def fragment(...)
HTML4::DocumentFragment.parse(...)
end
end

Expand Down

0 comments on commit bcd7cf9

Please sign in to comment.