Class: Row
- Inherits:
-
BaseObject
- Object
- BaseObject
- Row
- Defined in:
- lib/html_compilation/classes/objects/row.rb
Instance Attribute Summary collapse
-
#content ⇒ Object
Returns the value of attribute content.
-
#error_description ⇒ Object
Returns the value of attribute error_description.
-
#error_warning ⇒ Object
Returns the value of attribute error_warning.
-
#guideline ⇒ Object
Returns the value of attribute guideline.
-
#html_path ⇒ Object
Returns the value of attribute html_path.
-
#instances ⇒ Object
Returns the value of attribute instances.
-
#score ⇒ Object
Returns the value of attribute score.
-
#values ⇒ Object
Returns the value of attribute values.
Instance Method Summary collapse
- #calculate_score_value(collection_element) ⇒ Object
-
#initialize ⇒ Row
constructor
A new instance of Row.
Methods inherited from BaseObject
Constructor Details
#initialize ⇒ Row
Returns a new instance of Row.
5 6 7 8 |
# File 'lib/html_compilation/classes/objects/row.rb', line 5 def initialize super send("instances=", 1) end |
Instance Attribute Details
#content ⇒ Object
Returns the value of attribute content.
9 10 11 |
# File 'lib/html_compilation/classes/objects/row.rb', line 9 def content @content end |
#error_description ⇒ Object
Returns the value of attribute error_description.
9 10 11 |
# File 'lib/html_compilation/classes/objects/row.rb', line 9 def error_description @error_description end |
#error_warning ⇒ Object
Returns the value of attribute error_warning.
9 10 11 |
# File 'lib/html_compilation/classes/objects/row.rb', line 9 def error_warning @error_warning end |
#guideline ⇒ Object
Returns the value of attribute guideline.
9 10 11 |
# File 'lib/html_compilation/classes/objects/row.rb', line 9 def guideline @guideline end |
#html_path ⇒ Object
Returns the value of attribute html_path.
9 10 11 |
# File 'lib/html_compilation/classes/objects/row.rb', line 9 def html_path @html_path end |
#instances ⇒ Object
Returns the value of attribute instances.
9 10 11 |
# File 'lib/html_compilation/classes/objects/row.rb', line 9 def instances @instances end |
#score ⇒ Object
Returns the value of attribute score.
9 10 11 |
# File 'lib/html_compilation/classes/objects/row.rb', line 9 def score @score end |
#values ⇒ Object
Returns the value of attribute values.
9 10 11 |
# File 'lib/html_compilation/classes/objects/row.rb', line 9 def values @values end |
Instance Method Details
#calculate_score_value(collection_element) ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'lib/html_compilation/classes/objects/row.rb', line 11 def calculate_score_value(collection_element) dv = 1 collection_element.guidelines.each do |sg| if guideline.include?(sg.guideline) dv = sg.score end end set_value("score", dv) end |