Class: Meta::Utils::Kwargs::ProcConsumer
- Inherits:
-
Object
- Object
- Meta::Utils::Kwargs::ProcConsumer
- Defined in:
- lib/meta/utils/kwargs/consumers.rb
Instance Method Summary collapse
- #consume(final_args, args) ⇒ Object
-
#initialize(&blk) ⇒ ProcConsumer
constructor
A new instance of ProcConsumer.
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 |