Class: Clashinator::Achievement
- Inherits:
-
Object
- Object
- Clashinator::Achievement
- Defined in:
- lib/clashinator/achievement.rb
Overview
This class represents the achievement model through the player model
Instance Attribute Summary collapse
-
#completion_info ⇒ Object
Returns the value of attribute completion_info.
-
#info ⇒ Object
Returns the value of attribute info.
-
#name ⇒ Object
Returns the value of attribute name.
-
#stars ⇒ Object
Returns the value of attribute stars.
-
#target ⇒ Object
Returns the value of attribute target.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(attributes) ⇒ Achievement
constructor
A new instance of Achievement.
Constructor Details
#initialize(attributes) ⇒ Achievement
Returns a new instance of Achievement.
7 8 9 10 11 12 13 14 |
# File 'lib/clashinator/achievement.rb', line 7 def initialize(attributes) @name = attributes['name'] @stars = attributes['stars'] @value = attributes['value'] @target = attributes['target'] @info = attributes['info'] @completion_info = attributes['completion_info'] end |
Instance Attribute Details
#completion_info ⇒ Object
Returns the value of attribute completion_info.
5 6 7 |
# File 'lib/clashinator/achievement.rb', line 5 def completion_info @completion_info end |
#info ⇒ Object
Returns the value of attribute info.
5 6 7 |
# File 'lib/clashinator/achievement.rb', line 5 def info @info end |
#name ⇒ Object
Returns the value of attribute name.
5 6 7 |
# File 'lib/clashinator/achievement.rb', line 5 def name @name end |
#stars ⇒ Object
Returns the value of attribute stars.
5 6 7 |
# File 'lib/clashinator/achievement.rb', line 5 def stars @stars end |
#target ⇒ Object
Returns the value of attribute target.
5 6 7 |
# File 'lib/clashinator/achievement.rb', line 5 def target @target end |
#value ⇒ Object
Returns the value of attribute value.
5 6 7 |
# File 'lib/clashinator/achievement.rb', line 5 def value @value end |