Class: ActiveHookFilter

Inherits:
Object
  • Object
show all
Defined in:
app/models/hooks/active_hook_filter.rb

Instance Method Summary collapse

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

Returns:

  • (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