Class: FuzzyMatch::Result
- Inherits:
-
Object
- Object
- FuzzyMatch::Result
- Defined in:
- lib/fuzzy_match/result.rb
Overview
:nodoc: all
Constant Summary collapse
- EXPLANATION =
<<-ERB ##################################################### # SUMMARY ##################################################### Needle: <%= needle.inspect %> Match: <%= winner.inspect %> ##################################################### # OPTIONS ##################################################### <%= PP.pp(options, '') %> <% timeline.each_with_index do |event, index| %> (<%= index+1 %>) <%= event %> <% end %> ERB
Instance Attribute Summary collapse
-
#groupings ⇒ Object
Returns the value of attribute groupings.
-
#haystack ⇒ Object
Returns the value of attribute haystack.
-
#identities ⇒ Object
Returns the value of attribute identities.
-
#needle ⇒ Object
Returns the value of attribute needle.
-
#options ⇒ Object
Returns the value of attribute options.
-
#read ⇒ Object
Returns the value of attribute read.
-
#score ⇒ Object
Returns the value of attribute score.
-
#stop_words ⇒ Object
Returns the value of attribute stop_words.
-
#timeline ⇒ Object
readonly
Returns the value of attribute timeline.
-
#winner ⇒ Object
Returns the value of attribute winner.
Instance Method Summary collapse
- #explain ⇒ Object
-
#initialize ⇒ Result
constructor
A new instance of Result.
Constructor Details
#initialize ⇒ Result
Returns a new instance of Result.
37 38 39 |
# File 'lib/fuzzy_match/result.rb', line 37 def initialize @timeline = [] end |
Instance Attribute Details
#groupings ⇒ Object
Returns the value of attribute groupings.
30 31 32 |
# File 'lib/fuzzy_match/result.rb', line 30 def groupings @groupings end |
#haystack ⇒ Object
Returns the value of attribute haystack.
28 29 30 |
# File 'lib/fuzzy_match/result.rb', line 28 def haystack @haystack end |
#identities ⇒ Object
Returns the value of attribute identities.
31 32 33 |
# File 'lib/fuzzy_match/result.rb', line 31 def identities @identities end |
#needle ⇒ Object
Returns the value of attribute needle.
26 27 28 |
# File 'lib/fuzzy_match/result.rb', line 26 def needle @needle end |
#options ⇒ Object
Returns the value of attribute options.
29 30 31 |
# File 'lib/fuzzy_match/result.rb', line 29 def @options end |
#read ⇒ Object
Returns the value of attribute read.
27 28 29 |
# File 'lib/fuzzy_match/result.rb', line 27 def read @read end |
#score ⇒ Object
Returns the value of attribute score.
34 35 36 |
# File 'lib/fuzzy_match/result.rb', line 34 def score @score end |
#stop_words ⇒ Object
Returns the value of attribute stop_words.
32 33 34 |
# File 'lib/fuzzy_match/result.rb', line 32 def stop_words @stop_words end |
#timeline ⇒ Object (readonly)
Returns the value of attribute timeline.
35 36 37 |
# File 'lib/fuzzy_match/result.rb', line 35 def timeline @timeline end |
#winner ⇒ Object
Returns the value of attribute winner.
33 34 35 |
# File 'lib/fuzzy_match/result.rb', line 33 def winner @winner end |
Instance Method Details
#explain ⇒ Object
41 42 43 |
# File 'lib/fuzzy_match/result.rb', line 41 def explain $stdout.puts ::ERB.new(EXPLANATION, 0, '%<').result(binding) end |