Class: FeatureRich::FeatureHandler

Inherits:
Object
  • Object
show all
Defined in:
lib/feature-rich/feature_handler.rb

Direct Known Subclasses

GroupFeature

Instance Attribute Summary collapse

Instance Method Summary collapse

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, options = {})
  @name = name.to_sym
  @label = options[:label]
  @disabled = !! options[:disabled]
end

Instance Attribute Details

#disabledObject

Returns the value of attribute disabled.



5
6
7
# File 'lib/feature-rich/feature_handler.rb', line 5

def disabled
  @disabled
end

#labelObject

Returns the value of attribute label.



5
6
7
# File 'lib/feature-rich/feature_handler.rb', line 5

def label
  @label
end

#nameObject (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

Returns:

  • (Boolean)


13
14
15
# File 'lib/feature-rich/feature_handler.rb', line 13

def disabled?
  !! @disabled
end