Module: Lorax

Defined in:
lib/lorax.rb,
lib/lorax.rb,
lib/lorax/delta.rb,
lib/lorax/match.rb,
lib/lorax/delta_set.rb,
lib/lorax/match_set.rb,
lib/lorax/signature.rb,
lib/lorax/fast_matcher.rb,
lib/lorax/delta/delete_delta.rb,
lib/lorax/delta/insert_delta.rb,
lib/lorax/delta/modify_delta.rb,
lib/lorax/delta_set_generator.rb

Defined Under Namespace

Modules: DeltaSetGenerator Classes: DeleteDelta, Delta, DeltaSet, FastMatcher, InsertDelta, Match, MatchSet, ModifyDelta, Signature

Constant Summary collapse

VERSION =
"0.3.0.rc2"
REQUIRED_NOKOGIRI_VERSION =
"1.4.0"

Class Method Summary collapse

Class Method Details

.diff(string_or_io_or_nokogiridoc_1, string_or_io_or_nokogiridoc_2) ⇒ Object


19
20
21
22
23
24
# File 'lib/lorax.rb', line 19

def Lorax.diff(string_or_io_or_nokogiridoc_1, string_or_io_or_nokogiridoc_2)
  doc1      = documentize string_or_io_or_nokogiridoc_1
  doc2      = documentize string_or_io_or_nokogiridoc_2

  Lorax::FastMatcher.new(doc1, doc2).match.to_delta_set
end