Class: Lorax::FastMatcher

Inherits:
Object
  • Object
show all
Defined in:
lib/lorax/fast_matcher.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(doc1, doc2, dependency_injection = {}) ⇒ FastMatcher

Returns a new instance of FastMatcher.



5
6
7
8
9
# File 'lib/lorax/fast_matcher.rb', line 5

def initialize(doc1, doc2, dependency_injection={})
  @document1 = doc1
  @document2 = doc2
  @match_set = dependency_injection[:matcher_match_set] || MatchSet.new(doc1, doc2, dependency_injection)
end

Instance Attribute Details

#match_setObject

Returns the value of attribute match_set.



3
4
5
# File 'lib/lorax/fast_matcher.rb', line 3

def match_set
  @match_set
end

Instance Method Details

#matchObject



11
12
13
# File 'lib/lorax/fast_matcher.rb', line 11

def match
  match_node @document1.root
end