Class | Amrita::TextElement |
In: |
lib/amrita/format.rb
lib/amrita/node.rb |
Parent: | Object |
# File lib/amrita/node.rb, line 569 def initialize(text=nil) case text when nil @text = "" when String @text = text.frozen_copy when TextElement @text = x.to_s else @text = value.to_s.freeze end end
# File lib/amrita/node.rb, line 586 def ==(x) if x.is_a?(String) return @text == x else return @text == x.to_s end end