Class: Jcsv::RBParseDate

Inherits:
Filter
  • Object
show all
Defined in:
lib/date_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(start, next_filter: nil) ⇒ RBParseDate

Returns a new instance of RBParseDate.



104
105
106
107
# File 'lib/date_filters.rb', line 104

def initialize(start, next_filter: nil)
  @start = start
  super()
end

Instance Method Details

#execute(value, context) ⇒ Object



109
110
111
112
# File 'lib/date_filters.rb', line 109

def execute(value, context)
  validateInputNotNull(value, context)
  exec_next(DateTime.parse(value, @start), context)
end