Class: Sbmt::Strangler::FeatureFlags
- Inherits:
-
Object
- Object
- Sbmt::Strangler::FeatureFlags
- Defined in:
- lib/sbmt/strangler/feature_flags.rb
Constant Summary collapse
- FLAGS =
%i[ mirror replace ]
- FEATURES_HEADER_NAME =
"HTTP_STRANGLER_FEATURES"
Instance Attribute Summary collapse
-
#rails_controller ⇒ Object
readonly
Returns the value of attribute rails_controller.
-
#strangler_action ⇒ Object
readonly
Returns the value of attribute strangler_action.
Instance Method Summary collapse
- #add_all! ⇒ Object
-
#initialize(strangler_action:, rails_controller: nil) ⇒ FeatureFlags
constructor
A new instance of FeatureFlags.
Constructor Details
#initialize(strangler_action:, rails_controller: nil) ⇒ FeatureFlags
Returns a new instance of FeatureFlags.
14 15 16 17 |
# File 'lib/sbmt/strangler/feature_flags.rb', line 14 def initialize(strangler_action:, rails_controller: nil) @strangler_action = strangler_action @rails_controller = rails_controller end |
Instance Attribute Details
#rails_controller ⇒ Object (readonly)
Returns the value of attribute rails_controller.
12 13 14 |
# File 'lib/sbmt/strangler/feature_flags.rb', line 12 def rails_controller @rails_controller end |
#strangler_action ⇒ Object (readonly)
Returns the value of attribute strangler_action.
12 13 14 |
# File 'lib/sbmt/strangler/feature_flags.rb', line 12 def strangler_action @strangler_action end |
Instance Method Details
#add_all! ⇒ Object
23 24 25 |
# File 'lib/sbmt/strangler/feature_flags.rb', line 23 def add_all! FLAGS.each { |flag_name| add(feature_name(flag_name)) } end |