Class: Jcsv::RBCollector

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

Overview

Instance Attribute Summary collapse

Attributes included from NextFilter

#last_filter, #next_filter

Instance Method Summary collapse

Methods included from NextFilter

#>>, #exec_next

Constructor Details

#initializeRBCollector

Returns a new instance of RBCollector.



194
195
196
197
# File 'lib/filters.rb', line 194

def initialize
  @collection = []
  super()
end

Instance Attribute Details

#collectionObject (readonly)

Returns the value of attribute collection.



192
193
194
# File 'lib/filters.rb', line 192

def collection
  @collection
end

Instance Method Details

#execute(value, context) ⇒ Object



199
200
201
202
203
# File 'lib/filters.rb', line 199

def execute(value, context)
  validateInputNotNull(value, context)
  @collection << value
  exec_next(value, context)
end