Class: LLT::Review::Common::Reviewable
- Inherits:
-
Object
- Object
- LLT::Review::Common::Reviewable
show all
- Includes:
- Core::Structures::HashContainable
- Defined in:
- lib/llt/review/common/reviewable.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
#initialize(id, sentences) ⇒ Reviewable
8
9
10
11
|
# File 'lib/llt/review/common/reviewable.rb', line 8
def initialize(id, sentences)
super(id)
@sentences = sentences
end
|
Instance Attribute Details
#sentences ⇒ Object
Returns the value of attribute sentences.
6
7
8
|
# File 'lib/llt/review/common/reviewable.rb', line 6
def sentences
@sentences
end
|
Instance Method Details
#compare(gold, comparables = nil) ⇒ Object
23
24
25
26
27
|
# File 'lib/llt/review/common/reviewable.rb', line 23
def compare(gold, comparables = nil)
comparison = Comparison.new(gold, self)
comparison.compare(comparables)
add(comparison) if comparison.any?
end
|
#diff ⇒ Object
19
20
21
|
# File 'lib/llt/review/common/reviewable.rb', line 19
def diff
@container
end
|
#to_xml ⇒ Object
29
30
31
|
# File 'lib/llt/review/common/reviewable.rb', line 29
def to_xml
container_to_xml
end
|
#xml_tag ⇒ Object
can’t use the class methods that set the same, as we have subclasses using this value as well
15
16
17
|
# File 'lib/llt/review/common/reviewable.rb', line 15
def xml_tag
:reviewable
end
|