Class: InciScore::Score
- Inherits:
-
Object
- Object
- InciScore::Score
- Defined in:
- lib/inci_score/score.rb
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(hazard, weight) ⇒ Score
constructor
A new instance of Score.
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
#value ⇒ Object (readonly)
Returns the value of attribute value.
3 4 5 |
# File 'lib/inci_score/score.rb', line 3 def value @value end |