Module: Nokogiri::XML::PP::CharacterData

Included in:
CharacterData
Defined in:
lib/nokogiri/xml/pp/character_data.rb

Instance Method Summary collapse

Instance Method Details

#inspectObject

:nodoc:


12
13
14
# File 'lib/nokogiri/xml/pp/character_data.rb', line 12

def inspect # :nodoc:
  "#<#{self.class.name}:#{sprintf("0x%x",object_id)} #{text.inspect}>"
end

#pretty_print(pp) ⇒ Object

:nodoc:


5
6
7
8
9
10
# File 'lib/nokogiri/xml/pp/character_data.rb', line 5

def pretty_print pp # :nodoc:
  nice_name = self.class.name.split('::').last
  pp.group(2, "#(#{nice_name} ", ')') do
    pp.pp text
  end
end