Module: NdrSupport
- Defined in:
- lib/ndr_support/version.rb,
lib/ndr_support.rb,
lib/ndr_support/date_and_time_extensions.rb,
lib/ndr_support/yaml/serialization_migration.rb
Overview
Defined Under Namespace
Modules: YAML
Constant Summary collapse
- VERSION =
'4.1.2'
Class Method Summary collapse
-
.apply_era_date_formats! ⇒ Object
Within the NDR, we change default date formatting, as below.
- .attempt_date_patch! ⇒ Object
Class Method Details
.apply_era_date_formats! ⇒ Object
Within the NDR, we change default date formatting, as below. This can cause problems with YAML emitted by syck, so we have to patch Date#to_yaml too.
46 47 48 49 50 51 |
# File 'lib/ndr_support/date_and_time_extensions.rb', line 46 def apply_era_date_formats! update_date_formats! update_time_formats! attempt_date_patch! end |
.attempt_date_patch! ⇒ Object
53 54 55 56 57 58 |
# File 'lib/ndr_support/date_and_time_extensions.rb', line 53 def attempt_date_patch! # There are potential load order issues with this patch, # as it needs to be applied once syck has loaded. fail('Date#to_yaml must exist to be patched!') unless Date.respond_to?(:to_yaml) apply_date_patch! end |