Class: FeatureRich::FeatureHandler
- Inherits:
-
Object
- Object
- FeatureRich::FeatureHandler
- Defined in:
- lib/feature-rich/feature_handler.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#disabled ⇒ Object
Returns the value of attribute disabled.
-
#label ⇒ Object
Returns the value of attribute label.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #disabled? ⇒ Boolean
-
#initialize(name, options = {}) ⇒ FeatureHandler
constructor
A new instance of FeatureHandler.
Constructor Details
#initialize(name, options = {}) ⇒ FeatureHandler
Returns a new instance of FeatureHandler.
7 8 9 10 11 |
# File 'lib/feature-rich/feature_handler.rb', line 7 def initialize(name, = {}) @name = name.to_sym @label = [:label] @disabled = !! [:disabled] end |
Instance Attribute Details
#disabled ⇒ Object
Returns the value of attribute disabled.
5 6 7 |
# File 'lib/feature-rich/feature_handler.rb', line 5 def disabled @disabled end |
#label ⇒ Object
Returns the value of attribute label.
5 6 7 |
# File 'lib/feature-rich/feature_handler.rb', line 5 def label @label end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
4 5 6 |
# File 'lib/feature-rich/feature_handler.rb', line 4 def name @name end |
Instance Method Details
#disabled? ⇒ Boolean
13 14 15 |
# File 'lib/feature-rich/feature_handler.rb', line 13 def disabled? !! @disabled end |