Class: BBK::App::Matchers::Headers
- Defined in:
- lib/bbk/app/matchers/headers.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(rule) ⇒ Headers
constructor
A new instance of Headers.
- #match(headers, _payload = nil, _delivery_info = nil, *_args) ⇒ Object
Methods inherited from Base
#==, #eql?, #hash, #keys_deep, #match_impl
Constructor Details
#initialize(rule) ⇒ Headers
Returns a new instance of Headers.
8 9 10 |
# File 'lib/bbk/app/matchers/headers.rb', line 8 def initialize(rule) @rule = rule.with_indifferent_access end |
Instance Method Details
#match(headers, _payload = nil, _delivery_info = nil, *_args) ⇒ Object
12 13 14 15 16 |
# File 'lib/bbk/app/matchers/headers.rb', line 12 def match(headers, _payload = nil, _delivery_info = nil, *_args) match_impl(@rule, headers.with_indifferent_access) rescue StandardError nil end |