Sha256: 051b01b03c6fa1c521d1c57f504dc1340f5551df0aa1c110ab753c1194fe2603
Contents?: true
Size: 646 Bytes
Versions: 11
Compression:
Stored size: 646 Bytes
Contents
require 'genesis_ruby/utils/formatters/base' require 'date' module GenesisRuby module Utils module Formatters module Response module Formats # Response Timestamp format class Timestamp < Base # The Response keys that the formatter will be applied to def formatting_keys %w(timestamp) end # Format the given timestamp to DateTime object def format_key(timestamp) DateTime.parse timestamp rescue StandardError timestamp end end end end end end end
Version data entries
11 entries across 11 versions & 1 rubygems