Class: CanaryLabs::Feature
- Inherits:
-
Object
- Object
- CanaryLabs::Feature
- Defined in:
- lib/feature.rb
Instance Attribute Summary collapse
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(name, desc, participation_resolver) ⇒ Feature
constructor
A new instance of Feature.
- #participating?(identifier) ⇒ Boolean
Constructor Details
#initialize(name, desc, participation_resolver) ⇒ Feature
Returns a new instance of Feature.
7 8 9 10 11 |
# File 'lib/feature.rb', line 7 def initialize(name, desc, participation_resolver) @name = name @description = desc @participation_resolver = participation_resolver end |
Instance Attribute Details
#description ⇒ Object (readonly)
Returns the value of attribute description.
5 6 7 |
# File 'lib/feature.rb', line 5 def description @description end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/feature.rb', line 5 def name @name end |
Instance Method Details
#==(other) ⇒ Object
17 18 19 20 21 |
# File 'lib/feature.rb', line 17 def == other return false unless other.is_a? self.class other.name == self.name end |
#participating?(identifier) ⇒ Boolean
13 14 15 |
# File 'lib/feature.rb', line 13 def participating? identifier @participation_resolver.participating? identifier end |