Class: Flippeur::Feature
- Inherits:
-
Object
- Object
- Flippeur::Feature
- Defined in:
- lib/flippeur/feature.rb
Instance Attribute Summary collapse
-
#block ⇒ Object
readonly
Returns the value of attribute block.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #available?(actor) ⇒ Boolean
-
#initialize(name, &block) ⇒ Feature
constructor
A new instance of Feature.
Constructor Details
#initialize(name, &block) ⇒ Feature
Returns a new instance of Feature.
5 6 7 8 |
# File 'lib/flippeur/feature.rb', line 5 def initialize(name, &block) @name = name @block = block end |
Instance Attribute Details
#block ⇒ Object (readonly)
Returns the value of attribute block.
3 4 5 |
# File 'lib/flippeur/feature.rb', line 3 def block @block end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/flippeur/feature.rb', line 3 def name @name end |
Instance Method Details
#available?(actor) ⇒ Boolean
10 11 12 |
# File 'lib/flippeur/feature.rb', line 10 def available?(actor) block.call actor end |