Class: SimpleFeatureFlags::TestRamStorage

Inherits:
RamStorage
  • Object
show all
Defined in:
lib/simple_feature_flags/test_ram_storage.rb

Instance Attribute Summary

Attributes inherited from RamStorage

#file, #flags, #mandatory_flags

Instance Method Summary collapse

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, #exists?, #get, #inactive?, #inactive_for?, #inactive_globally?, #inactive_partially?, #initialize, #namespaced_redis, #redis, #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

Returns:

  • (Boolean)

Raises:



5
6
7
8
9
# File 'lib/simple_feature_flags/test_ram_storage.rb', line 5

def active?(feature)
  raise(FlagNotDefinedError, "Feature Flag `#{feature}` is not defined as mandatory in #{file}") unless mandatory_flags.include?(feature.to_s)

  super
end