Class: Row

Inherits:
BaseObject show all
Defined in:
lib/html_compilation/classes/objects/row.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from BaseObject

#set_value

Constructor Details

#initializeRow

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

#contentObject

Returns the value of attribute content.



9
10
11
# File 'lib/html_compilation/classes/objects/row.rb', line 9

def content
  @content
end

#error_descriptionObject

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_warningObject

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

#guidelineObject

Returns the value of attribute guideline.



9
10
11
# File 'lib/html_compilation/classes/objects/row.rb', line 9

def guideline
  @guideline
end

#html_pathObject

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

#instancesObject

Returns the value of attribute instances.



9
10
11
# File 'lib/html_compilation/classes/objects/row.rb', line 9

def instances
  @instances
end

#scoreObject

Returns the value of attribute score.



9
10
11
# File 'lib/html_compilation/classes/objects/row.rb', line 9

def score
  @score
end

#valuesObject

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