Class: Sbmt::Strangler::ActionInvoker
- Inherits:
-
Object
- Object
- Sbmt::Strangler::ActionInvoker
- Defined in:
- lib/sbmt/strangler/action_invoker.rb
Instance Attribute Summary collapse
-
#feature_flags ⇒ Object
readonly
Returns the value of attribute feature_flags.
-
#metric_tracker ⇒ Object
readonly
Returns the value of attribute metric_tracker.
-
#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
- #call ⇒ Object
-
#initialize(rails_controller:, strangler_action:, metric_tracker:, feature_flags:) ⇒ ActionInvoker
constructor
A new instance of ActionInvoker.
Constructor Details
#initialize(rails_controller:, strangler_action:, metric_tracker:, feature_flags:) ⇒ ActionInvoker
Returns a new instance of ActionInvoker.
8 9 10 11 12 13 |
# File 'lib/sbmt/strangler/action_invoker.rb', line 8 def initialize(rails_controller:, strangler_action:, metric_tracker:, feature_flags:) @rails_controller = rails_controller @strangler_action = strangler_action @metric_tracker = metric_tracker @feature_flags = feature_flags end |
Instance Attribute Details
#feature_flags ⇒ Object (readonly)
Returns the value of attribute feature_flags.
6 7 8 |
# File 'lib/sbmt/strangler/action_invoker.rb', line 6 def feature_flags @feature_flags end |
#metric_tracker ⇒ Object (readonly)
Returns the value of attribute metric_tracker.
6 7 8 |
# File 'lib/sbmt/strangler/action_invoker.rb', line 6 def metric_tracker @metric_tracker end |
#rails_controller ⇒ Object (readonly)
Returns the value of attribute rails_controller.
6 7 8 |
# File 'lib/sbmt/strangler/action_invoker.rb', line 6 def rails_controller @rails_controller end |
#strangler_action ⇒ Object (readonly)
Returns the value of attribute strangler_action.
6 7 8 |
# File 'lib/sbmt/strangler/action_invoker.rb', line 6 def strangler_action @strangler_action end |
Instance Method Details
#call ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/sbmt/strangler/action_invoker.rb', line 17 def call track_params_usage log_unallowed_params track_work_mode(work_mode_class.name.demodulize.underscore) work_mode_class.new( rails_controller:, strangler_action:, metric_tracker:, feature_flags: ).call end |