Class: Scorecard::Badge
- Inherits:
-
Object
- Object
- Scorecard::Badge
- Defined in:
- lib/scorecard/badge.rb
Instance Attribute Summary collapse
-
#check ⇒ Object
Returns the value of attribute check.
-
#gameables ⇒ Object
Returns the value of attribute gameables.
-
#identifier ⇒ Object
readonly
Returns the value of attribute identifier.
-
#locked ⇒ Object
Returns the value of attribute locked.
-
#name ⇒ Object
Returns the value of attribute name.
-
#unlocked ⇒ Object
Returns the value of attribute unlocked.
Instance Method Summary collapse
-
#initialize(identifier, &block) ⇒ Badge
constructor
A new instance of Badge.
- #repeatable? ⇒ Boolean
Constructor Details
#initialize(identifier, &block) ⇒ Badge
Returns a new instance of Badge.
5 6 7 8 9 |
# File 'lib/scorecard/badge.rb', line 5 def initialize(identifier, &block) @identifier = identifier block.call self end |
Instance Attribute Details
#check ⇒ Object
Returns the value of attribute check.
3 4 5 |
# File 'lib/scorecard/badge.rb', line 3 def check @check end |
#gameables ⇒ Object
Returns the value of attribute gameables.
3 4 5 |
# File 'lib/scorecard/badge.rb', line 3 def gameables @gameables end |
#identifier ⇒ Object (readonly)
Returns the value of attribute identifier.
2 3 4 |
# File 'lib/scorecard/badge.rb', line 2 def identifier @identifier end |
#locked ⇒ Object
Returns the value of attribute locked.
3 4 5 |
# File 'lib/scorecard/badge.rb', line 3 def locked @locked end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/scorecard/badge.rb', line 3 def name @name end |
#unlocked ⇒ Object
Returns the value of attribute unlocked.
3 4 5 |
# File 'lib/scorecard/badge.rb', line 3 def unlocked @unlocked end |
Instance Method Details
#repeatable? ⇒ Boolean
11 12 13 |
# File 'lib/scorecard/badge.rb', line 11 def repeatable? @gameables.present? end |