Class: AdHonorem::Objective
- Inherits:
-
Object
- Object
- AdHonorem::Objective
- Defined in:
- lib/adhonorem/models/objective.rb
Overview
Represent a badge objective Re-created on-the-fly at each badge instantiation
Instance Attribute Summary collapse
-
#amount_needed ⇒ Object
readonly
Returns the value of attribute amount_needed.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#slug ⇒ Object
readonly
Returns the value of attribute slug.
Instance Method Summary collapse
-
#initialize(slug, name, description, amount_needed = 1) ⇒ Objective
constructor
A new instance of Objective.
Constructor Details
#initialize(slug, name, description, amount_needed = 1) ⇒ Objective
Returns a new instance of Objective.
7 8 9 10 11 12 |
# File 'lib/adhonorem/models/objective.rb', line 7 def initialize(slug, name, description, amount_needed = 1) @slug = slug @name = name @description = description @amount_needed = amount_needed end |
Instance Attribute Details
#amount_needed ⇒ Object (readonly)
Returns the value of attribute amount_needed.
5 6 7 |
# File 'lib/adhonorem/models/objective.rb', line 5 def amount_needed @amount_needed end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
5 6 7 |
# File 'lib/adhonorem/models/objective.rb', line 5 def description @description end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/adhonorem/models/objective.rb', line 5 def name @name end |
#slug ⇒ Object (readonly)
Returns the value of attribute slug.
5 6 7 |
# File 'lib/adhonorem/models/objective.rb', line 5 def slug @slug end |