Class: Meta::Utils::Kwargs::ProcConsumer

Inherits:
Object
  • Object
show all
Defined in:
lib/meta/utils/kwargs/consumers.rb

Instance Method Summary collapse

Constructor Details

#initialize(&blk) ⇒ ProcConsumer

Returns a new instance of ProcConsumer.



41
42
43
# File 'lib/meta/utils/kwargs/consumers.rb', line 41

def initialize(&blk)
  @block = blk
end

Instance Method Details

#consume(final_args, args) ⇒ Object



45
46
47
# File 'lib/meta/utils/kwargs/consumers.rb', line 45

def consume(final_args, args)
  @block.call(final_args, args) if @block
end