Class: Telebugs::Middleware::IgnoreEnvironments
- Inherits:
-
BaseMiddleware
- Object
- BaseMiddleware
- Telebugs::Middleware::IgnoreEnvironments
- Defined in:
- lib/telebugs/middleware/ignore_environments.rb
Constant Summary
Constants inherited from BaseMiddleware
BaseMiddleware::DEFAULT_WEIGHT
Instance Method Summary collapse
- #call(report) ⇒ Object
-
#initialize(current_env, ignore_envs) ⇒ IgnoreEnvironments
constructor
A new instance of IgnoreEnvironments.
- #weight ⇒ Object
Constructor Details
#initialize(current_env, ignore_envs) ⇒ IgnoreEnvironments
Returns a new instance of IgnoreEnvironments.
6 7 8 9 |
# File 'lib/telebugs/middleware/ignore_environments.rb', line 6 def initialize(current_env, ignore_envs) @current_env = current_env @ignore_envs = ignore_envs end |
Instance Method Details
#call(report) ⇒ Object
11 12 13 |
# File 'lib/telebugs/middleware/ignore_environments.rb', line 11 def call(report) report.ignored = @ignore_envs.include?(@current_env) end |
#weight ⇒ Object
15 16 17 |
# File 'lib/telebugs/middleware/ignore_environments.rb', line 15 def weight -1000 end |