Class: RexleDiff

Inherits:
Object
  • Object
show all
Defined in:
lib/rexle-diff.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(source1, source2, fuzzy_match: false) ⇒ RexleDiff

Returns a new instance of RexleDiff.



13
14
15
16
17
18
19
20
# File 'lib/rexle-diff.rb', line 13

def initialize(source1, source2, fuzzy_match: false)    

  @fuzzy_match = fuzzy_match
  doc1, doc2  = Rexle.new(source1), Rexle.new(source2)
  compare(doc1.root, doc2.root)

  @to_doc = doc2
end

Instance Attribute Details

#to_docObject (readonly)

Returns the value of attribute to_doc.



11
12
13
# File 'lib/rexle-diff.rb', line 11

def to_doc
  @to_doc
end