Class: RexleDiff

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

Defined Under Namespace

Classes: HashedDoc

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of RexleDiff.



65
66
67
68
69
70
71
72
73
74
75
# File 'lib/rexle-diff.rb', line 65

def initialize(source1, source2, fuzzy_match: false)    

  @fuzzy_match = fuzzy_match

  doc1, doc2  = HashedDoc.new(Rexle.new(source1).root).to_doc, 
      HashedDoc.new(Rexle.new(source2).root).to_doc

  compare(doc1.root, doc2.root)

  @to_doc = doc2
end

Instance Attribute Details

#to_docObject (readonly)

Returns the value of attribute to_doc.



63
64
65
# File 'lib/rexle-diff.rb', line 63

def to_doc
  @to_doc
end