Class: InciScore::Score

Inherits:
Object
  • Object
show all
Defined in:
lib/inci_score/score.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hazard, weight) ⇒ Score

Returns a new instance of Score.



5
6
7
8
9
# File 'lib/inci_score/score.rb', line 5

def initialize(hazard, weight)
  @hazard = hazard
  @weight = weight
  @value = compute
end

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



3
4
5
# File 'lib/inci_score/score.rb', line 3

def value
  @value
end