Class: SimpleFeatureFlags::TestRamStorage
- Inherits:
-
RamStorage
- Object
- BaseStorage
- RamStorage
- SimpleFeatureFlags::TestRamStorage
- Defined in:
- lib/simple_feature_flags/test_ram_storage.rb
Overview
Used in tests
Instance Attribute Summary
Attributes inherited from RamStorage
#file, #flags, #mandatory_flags
Instance Method Summary collapse
-
#active?(feature) ⇒ Boolean
: ((Symbol | String) feature) -> bool.
Methods inherited from RamStorage
#activate, #activate_for, #activate_for!, #activate_partially, #active, #active_for?, #active_globally?, #active_objects, #active_partially?, #add, #all, #deactivate, #deactivate!, #deactivate_for, #description, #do_activate, #do_activate_partially, #do_deactivate, #exists?, #get, #inactive?, #inactive_for?, #inactive_globally?, #inactive_partially?, #initialize, #remove, #when_active, #when_active_for, #when_active_globally, #when_active_partially, #when_inactive, #when_inactive_for, #when_inactive_globally, #when_inactive_partially
Methods inherited from BaseStorage
#activate, #activate_for, #activate_for!, #activate_globally, #activate_partially, #active, #active_for?, #active_globally?, #active_objects, #active_partially?, #add, #all, #deactivate, #deactivate!, #deactivate_for, #description, #do_activate, #do_activate_globally, #do_activate_partially, #do_deactivate, #exists?, #file, #get, #inactive?, #inactive_for?, #inactive_globally?, #inactive_partially?, #mandatory_flags, #remove, #when_active, #when_active_for, #when_active_globally, #when_active_partially, #when_inactive, #when_inactive_for, #when_inactive_globally, #when_inactive_partially
Constructor Details
This class inherits a constructor from SimpleFeatureFlags::RamStorage
Instance Method Details
#active?(feature) ⇒ Boolean
: ((Symbol | String) feature) -> bool
9 10 11 12 13 14 15 16 |
# File 'lib/simple_feature_flags/test_ram_storage.rb', line 9 def active?(feature) unless mandatory_flags.include?(feature.to_s) raise(FlagNotDefinedError, "Feature Flag `#{feature}` is not defined as mandatory in #{file}",) end super end |