APIdock / Ruby
/
Browse About
method

comments

v2_6_3 - Show latest stable - Class: REXML::Element
comments()
public

Get an array of all Comment children. IMMUTABLE

# File lib/rexml/element.rb, line 674
    def comments
      find_all { |child| child.kind_of? Comment }.freeze
    end

Related methods

  • Instance methods
  • []
  • add_attribute
  • add_attributes
  • add_element
  • add_namespace
  • add_text
  • attribute
  • cdatas
  • clone
  • comments
  • delete_attribute
  • delete_element
  • delete_namespace
  • document
  • each_element
  • each_element_with_attribute
  • each_element_with_text
  • get_elements
  • get_text
  • has_attributes?
  • has_elements?
  • has_text?
  • ignore_whitespace_nodes
  • inspect
  • instructions
  • namespace
  • namespaces
  • next_element
  • node_type
  • prefixes
  • previous_element
  • raw
  • root
  • root_node
  • text
  • text=
  • texts
  • whitespace
  • write
  • xpath
  • Class methods
  • new
  • Private methods
  • private__to_xpath_helper
  • privateeach_with_something
APIdock API Documentation Browser

© 2026 APIdock