Class: Jcsv::RBDynamic

Inherits:
Filter
  • Object
show all
Defined in:
lib/filters.rb

Overview

Instance Attribute Summary

Attributes included from NextFilter

#last_filter, #next_filter

Instance Method Summary collapse

Methods included from NextFilter

#>>, #exec_next

Constructor Details

#initialize(block: nil) ⇒ RBDynamic

Returns a new instance of RBDynamic.



227
228
229
230
# File 'lib/filters.rb', line 227

def initialize(block: nil)
  @block = block
  super()
end

Instance Method Details

#execute(value, context) ⇒ Object



232
233
234
235
# File 'lib/filters.rb', line 232

def execute(value, context)
  value = @block.call(value, context) if @block
  exec_next(value, context)
end