Skip to content

Commit afafbac

Browse files
Fix RDoc for Element (#87)
* Add missing plus for `Element#has_text?`. * Remove unneeded hash and duplicated `the` for `Element#text`.
1 parent d442ccf commit afafbac

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/rexml/element.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -989,7 +989,7 @@ def previous_element
989989
# :call-seq:
990990
# has_text? -> true or false
991991
#
992-
# Returns +true if the element has one or more text noded,
992+
# Returns +true+ if the element has one or more text noded,
993993
# +false+ otherwise:
994994
#
995995
# d = REXML::Document.new '<a><b/>text<c/></a>'
@@ -1006,15 +1006,15 @@ def has_text?
10061006
# text(xpath = nil) -> text_string or nil
10071007
#
10081008
# Returns the text string from the first text node child
1009-
# in a specified element, if it exists, # +nil+ otherwise.
1009+
# in a specified element, if it exists, +nil+ otherwise.
10101010
#
10111011
# With no argument, returns the text from the first text node in +self+:
10121012
#
10131013
# d = REXML::Document.new "<p>some text <b>this is bold!</b> more text</p>"
10141014
# d.root.text.class # => String
10151015
# d.root.text # => "some text "
10161016
#
1017-
# With argument +xpath+, returns text from the the first text node
1017+
# With argument +xpath+, returns text from the first text node
10181018
# in the element that matches +xpath+:
10191019
#
10201020
# d.root.text(1) # => "this is bold!"

0 commit comments

Comments
 (0)