Class: Jcsv::RBParseStrptime

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(format, start) ⇒ RBParseStrptime

Returns a new instance of RBParseStrptime.



177
178
179
180
181
# File 'lib/date_filters.rb', line 177

def initialize(format, start)
  @format = format
  @start = start
  super()
end

Instance Method Details

#execute(value, context) ⇒ Object



183
184
185
186
# File 'lib/date_filters.rb', line 183

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