Class: Flipper::Gates::Actor
Constant Summary
collapse
- Key =
:actors
Flipper::Gate::Separator
Instance Attribute Summary
#feature
Instance Method Summary
collapse
#disable, #enable, #initialize, #key, #key_prefix, #match?, #toggle
Constructor Details
This class inherits a constructor from Flipper::Gate
Instance Method Details
#identifiers ⇒ Object
20
21
22
|
# File 'lib/flipper/gates/actor.rb', line 20
def identifiers
toggle.value
end
|
#open?(actor) ⇒ Boolean
14
15
16
17
18
|
# File 'lib/flipper/gates/actor.rb', line 14
def open?(actor)
if actor && actor.respond_to?(:identifier)
identifiers.include?(actor.identifier)
end
end
|
#protects?(thing) ⇒ Boolean
24
25
26
|
# File 'lib/flipper/gates/actor.rb', line 24
def protects?(thing)
thing.is_a?(Flipper::Types::Actor)
end
|
#toggle_class ⇒ Object
10
11
12
|
# File 'lib/flipper/gates/actor.rb', line 10
def toggle_class
Toggles::Set
end
|
#type_key ⇒ Object
6
7
8
|
# File 'lib/flipper/gates/actor.rb', line 6
def type_key
Key
end
|