Method: Hx::Interop::Interceptor::Base#initialize
- Defined in:
- lib/interop/interceptor/base.rb
#initialize(stream, &block) ⇒ Base
Returns a new instance of Base.
6 7 8 9 10 11 |
# File 'lib/interop/interceptor/base.rb', line 6 def initialize(stream, &block) raise ArgumentError, 'Expected a block that takes exactly 2 arguments' unless [2, -1].include? block&.arity @stream = stream @handler = block end |