Class: CatchBox::Hook::One
- Inherits:
-
CatchBox::Hook
- Object
- CatchBox::Hook
- CatchBox::Hook::One
- Defined in:
- lib/catch_box/hook/one.rb
Instance Method Summary collapse
-
#initialize(pattern, hook) ⇒ One
constructor
A new instance of One.
- #match?(pattern) ⇒ Boolean
Methods inherited from CatchBox::Hook
Constructor Details
#initialize(pattern, hook) ⇒ One
Returns a new instance of 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 |