Class: Moult::Flags::Snapshot::FlagSet
- Inherits:
-
Struct
- Object
- Struct
- Moult::Flags::Snapshot::FlagSet
- Defined in:
- lib/moult/flags/snapshot.rb
Overview
A normalised snapshot: the provider's state per flag key, plus provenance.
Instance Attribute Summary collapse
-
#source ⇒ Object
Returns the value of attribute source.
-
#states ⇒ Object
Returns the value of attribute states.
Instance Method Summary collapse
-
#key?(flag_key) ⇒ Boolean
Whether the provider knows this key.
-
#state_for(flag_key) ⇒ FlagState?
The provider's state for the key, or nil if absent.
Instance Attribute Details
#source ⇒ Object
Returns the value of attribute source
58 59 60 |
# File 'lib/moult/flags/snapshot.rb', line 58 def source @source end |
#states ⇒ Object
Returns the value of attribute states
58 59 60 |
# File 'lib/moult/flags/snapshot.rb', line 58 def states @states end |
Instance Method Details
#key?(flag_key) ⇒ Boolean
Returns whether the provider knows this key.
60 61 62 |
# File 'lib/moult/flags/snapshot.rb', line 60 def key?(flag_key) states.key?(flag_key) end |
#state_for(flag_key) ⇒ FlagState?
Returns the provider's state for the key, or nil if absent.
65 66 67 |
# File 'lib/moult/flags/snapshot.rb', line 65 def state_for(flag_key) states[flag_key] end |