Class: Flipper::Types::Group
- Inherits:
-
Flipper::Type
- Object
- Flipper::Type
- Flipper::Types::Group
- Defined in:
- lib/flipper/types/group.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #enabled_value ⇒ Object (also: #disabled_value)
-
#initialize(name, &block) ⇒ Group
constructor
A new instance of Group.
- #match?(*args) ⇒ Boolean
Constructor Details
#initialize(name, &block) ⇒ Group
Returns a new instance of Group.
6 7 8 9 |
# File 'lib/flipper/types/group.rb', line 6 def initialize(name, &block) @name = name.to_sym @block = block end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
4 5 6 |
# File 'lib/flipper/types/group.rb', line 4 def name @name end |
Instance Method Details
#enabled_value ⇒ Object Also known as: disabled_value
15 16 17 |
# File 'lib/flipper/types/group.rb', line 15 def enabled_value @name end |
#match?(*args) ⇒ Boolean
11 12 13 |
# File 'lib/flipper/types/group.rb', line 11 def match?(*args) @block.call(*args) == true end |