Class: Datanorm::Headers::V5::Date
- Inherits:
-
Object
- Object
- Datanorm::Headers::V5::Date
- Includes:
- Calls
- Defined in:
- lib/datanorm/headers/v5/date.rb
Overview
Parses a Date from the raw first line of a DATANORM file.
Instance Method Summary collapse
Instance Method Details
#call ⇒ Object
12 13 14 15 16 17 |
# File 'lib/datanorm/headers/v5/date.rb', line 12 def call # Date.parse(nil) always returns a valid date, so we need to catch that. return unless columns[3] ::Date.parse(columns[3]) end |
#columns ⇒ Object
19 20 21 |
# File 'lib/datanorm/headers/v5/date.rb', line 19 def columns line.split(';') end |