Class: REXML::Text
- Inherits:
-
Object
- Object
- REXML::Text
- Defined in:
- lib/jrexml/ext/no_unnormalize.rb
Instance Method Summary collapse
-
#initialize(value, *args) ⇒ Text
constructor
Redefine text initialize to receive the expanded value, since this is done by JREXML.
- #original_initialize ⇒ Object
Constructor Details
#initialize(value, *args) ⇒ Text
Redefine text initialize to receive the expanded value, since this is done by JREXML.
Original arity/args is: def initialize arg, respect_whitespace=false, parent=nil, raw=nil, entity_filter=nil, illegal=ILLEGAL
13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/jrexml/ext/no_unnormalize.rb', line 13 def initialize(value, *args) # Text.new is always called with raw = true from treeparser.rb if !REXML::Parsers::BaseParser.default_parser && args[2] args[2] = nil original_initialize(value, *args) # Set the 'unnormalized' ivar up front, since it's already expanded @unnormalized = value else original_initialize(value, *args) end end |
Instance Method Details
#original_initialize ⇒ Object
6 |
# File 'lib/jrexml/ext/no_unnormalize.rb', line 6 alias_method :original_initialize, :initialize |