class HypDiff::TextFromNode
Public Class Methods
new(raw_text, node)
click to toggle source
# File lib/hyp_diff/text_from_node.rb, line 4 def initialize(raw_text, node) @text = raw_text.strip == "" ? " " : raw_text @node = node end
Public Instance Methods
==(other)
click to toggle source
# File lib/hyp_diff/text_from_node.rb, line 9 def ==(other) text == other.text end
eql?(other)
click to toggle source
# File lib/hyp_diff/text_from_node.rb, line 13 def eql?(other) text == other.text end
hash()
click to toggle source
# File lib/hyp_diff/text_from_node.rb, line 17 def hash text.hash end
node()
click to toggle source
# File lib/hyp_diff/text_from_node.rb, line 29 def node @node end
text()
click to toggle source
# File lib/hyp_diff/text_from_node.rb, line 25 def text @text end
whitespace?()
click to toggle source
# File lib/hyp_diff/text_from_node.rb, line 21 def whitespace? @text == " " end