Class: Contactology::Issues
Instance Attribute Summary collapse
-
#score ⇒ Object
readonly
Returns the value of attribute score.
Instance Method Summary collapse
- #<<(o) ⇒ Object
-
#initialize(data = nil) ⇒ Issues
constructor
A new instance of Issues.
Methods inherited from Array
Constructor Details
#initialize(data = nil) ⇒ Issues
Returns a new instance of Issues.
9 10 11 12 13 |
# File 'lib/contactology/issues.rb', line 9 def initialize(data = nil) data = Hash.new unless data.is_a?(Hash) @score = data['score'] || 0 (data['issues'] || []).each { |i| self << i } end |
Instance Attribute Details
#score ⇒ Object (readonly)
Returns the value of attribute score.
7 8 9 |
# File 'lib/contactology/issues.rb', line 7 def score @score end |