Class: Leptris::XML::Text
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from Node
Instance Method Summary collapse
Methods inherited from Node
#<=>, #==, #cdata?, #child, #children, #comment?, #css_path, #dup, #element?, #element_children, #ensure_writable!, #first_element_child, #initialize, #inner_text, #inspect, #last_element_child, #line, #next_element, #next_sibling, #parent, #path, #previous_element, #previous_sibling, #processing_instruction?, #text, #text?, #traverse, #type, #unlink, wrap
Methods included from Searchable
#at, #at_css, #at_xpath, #css, #search, wrap_xpath_result, #xpath
Constructor Details
This class inherits a constructor from Leptris::XML::Node
Instance Method Details
#content ⇒ Object
6 7 8 9 10 11 |
# File 'lib/leptris/xml/text.rb', line 6 def content return @content if readonly_cached?(:@content) Leptris::XML::FFI.leptris_text_node_get_content(@c_ptr).tap do |text| @content = text if @document&.readonly? end end |
#content=(new_content) ⇒ Object
13 14 15 16 17 18 |
# File 'lib/leptris/xml/text.rb', line 13 def content=(new_content) ensure_writable! Leptris::XML::FFI.check_status( Leptris::XML::FFI.leptris_text_node_set_content(@c_ptr, new_content.to_s)) new_content end |
#name ⇒ Object
4 |
# File 'lib/leptris/xml/text.rb', line 4 def name; "text"; end |