Class: Nokogiri::XML::NodeSet
- Inherits:
-
Object
- Object
- Nokogiri::XML::NodeSet
- Defined in:
- lib/sinew/nokogiri_ext.rb,
lib/sinew/nokogiri_ext.rb
Overview
modify NodeSet to join with SPACE instead of empty string
Instance Method Summary collapse
- #inner_html(*args) ⇒ Object
- #inner_text ⇒ Object
- #old_inner_html ⇒ Object
- #old_inner_text ⇒ Object
- #text_just_me ⇒ Object
Instance Method Details
#inner_html(*args) ⇒ Object
11 12 13 |
# File 'lib/sinew/nokogiri_ext.rb', line 11 def inner_html *args collect { |i| i.inner_html(*args) }.join(" ") end |
#inner_text ⇒ Object
8 9 10 |
# File 'lib/sinew/nokogiri_ext.rb', line 8 def inner_text collect { |i| i.inner_text }.join(" ") end |
#old_inner_html ⇒ Object
5 |
# File 'lib/sinew/nokogiri_ext.rb', line 5 alias :old_inner_html :inner_html |
#old_inner_text ⇒ Object
6 |
# File 'lib/sinew/nokogiri_ext.rb', line 6 alias :old_inner_text :inner_text |
#text_just_me ⇒ Object
24 25 26 |
# File 'lib/sinew/nokogiri_ext.rb', line 24 def text_just_me map { |i| i.text_just_me }.join(" ") end |