class LLT::Review::Common::Sentence
Public Instance Methods
clone()
click to toggle source
Calls superclass method
# File lib/llt/review/common/sentence.rb, line 24 def clone cloned = super cloned.replace_with_clone(:report) cloned end
compare(other, comparables = nil)
click to toggle source
# File lib/llt/review/common/sentence.rb, line 14 def compare(other, comparables = nil) diff = new_sentence_diff words.each do |id, word| other_word = other[id] || dummy_word(id) word.compare(other_word, diff, comparables) end diff end
report()
click to toggle source
# File lib/llt/review/common/sentence.rb, line 10 def report @report ||= create_report end
words()
click to toggle source
# File lib/llt/review/common/sentence.rb, line 6 def words @container end
Private Instance Methods
create_report()
click to toggle source
# File lib/llt/review/common/sentence.rb, line 40 def create_report @report ||= begin report_container.each do |_, reportable| reportable.collect_reports(words) end end end
dummy_word(id)
click to toggle source
# File lib/llt/review/common/sentence.rb, line 32 def dummy_word(id) # implemented by subclasses end
new_sentence_diff()
click to toggle source
# File lib/llt/review/common/sentence.rb, line 36 def new_sentence_diff diff_namespace.const_get(:Sentence).new(self) end