lib/fuzzy_match/result.rb in fuzzy_match-1.3.3 vs lib/fuzzy_match/result.rb in fuzzy_match-1.4.0
- old
+ new
@@ -17,23 +17,24 @@
<% timeline.each_with_index do |event, index| %>
(<%= index+1 %>) <%= event %>
<% end %>
ERB
- def timeline
- @timeline ||= []
- end
-
attr_accessor :needle
attr_accessor :read
attr_accessor :haystack
attr_accessor :options
attr_accessor :normalizers
attr_accessor :groupings
attr_accessor :identities
attr_accessor :stop_words
attr_accessor :winner
attr_accessor :score
+ attr_reader :timeline
+
+ def initialize
+ @timeline = []
+ end
def explain
$stdout.puts ::ERB.new(EXPLANATION, 0, '%<').result(binding)
end
end