Class: ActiveHookFilter
- Inherits:
-
Object
- Object
- ActiveHookFilter
- Defined in:
- app/models/hooks/active_hook_filter.rb
Instance Method Summary collapse
-
#initialize(hook) ⇒ ActiveHookFilter
constructor
A new instance of ActiveHookFilter.
- #matches?(hooks_scope, data) ⇒ Boolean
Constructor Details
#initialize(hook) ⇒ ActiveHookFilter
Returns a new instance of ActiveHookFilter.
4 5 6 |
# File 'app/models/hooks/active_hook_filter.rb', line 4 def initialize(hook) @hook = hook end |
Instance Method Details
#matches?(hooks_scope, data) ⇒ Boolean
8 9 10 11 12 |
# File 'app/models/hooks/active_hook_filter.rb', line 8 def matches?(hooks_scope, data) return true unless hooks_scope == :push_hooks matches_branch?(data) end |