Skip to content

Commit

Permalink
Fix ParseOptions examples
Browse files Browse the repository at this point in the history
Nokogiri.XML does not accept keyword arguments.
  • Loading branch information
orhantoy committed May 9, 2019
1 parent f7b2c82 commit 2901979
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/nokogiri/xml/parse_options.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ module XML
#
# == Building combinations of parse options
# You can build your own combinations of these parse options by using any of the following methods:
# *Note*: All examples attempt to set the +RECOVER+ & +NOENT+ options. All examples use Ruby 2 optional parameter syntax.
# *Note*: All examples attempt to set the +RECOVER+ & +NOENT+ options.
# [Ruby's bitwise operators] You can use the Ruby bitwise operators to set various combinations.
# Nokogiri.XML('<content>Chapter 1</content', options: Nokogiri::XML::ParseOptions.new((1 << 0) | (1 << 1)))
# Nokogiri.XML('<content>Chapter 1</content', nil, nil, Nokogiri::XML::ParseOptions.new((1 << 0) | (1 << 1)))
# [Method chaining] Every option has an equivalent method in lowercase. You can chain these methods together to set various combinations.
# Nokogiri.XML('<content>Chapter 1</content', options: Nokogiri::XML::ParseOptions.new.recover.noent)
# Nokogiri.XML('<content>Chapter 1</content', nil, nil, Nokogiri::XML::ParseOptions.new.recover.noent)
# [Using Ruby Blocks] You can also setup parse combinations in the block passed to Nokogiri.XML or Nokogiri.HTML
# Nokogiri.XML('<content>Chapter 1</content') {|config| config.recover.noent}
#
Expand Down

0 comments on commit 2901979

Please sign in to comment.