Class: CatchBox::Hook::One

Inherits:
CatchBox::Hook show all
Defined in:
lib/catch_box/hook/one.rb

Instance Method Summary collapse

Methods inherited from CatchBox::Hook

#call

Constructor Details

#initialize(pattern, hook) ⇒ One



8
9
10
11
12
# File 'lib/catch_box/hook/one.rb', line 8

def initialize(pattern, hook)
  @pattern = pattern

  super(hook)
end

Instance Method Details

#match?(pattern) ⇒ Boolean



14
15
16
# File 'lib/catch_box/hook/one.rb', line 14

def match?(pattern)
  @pattern == pattern
end