Class: PG::TextDecoder::TimestampUtc
- Inherits:
-
Timestamp
- Object
- Coder
- SimpleCoder
- SimpleDecoder
- Timestamp
- PG::TextDecoder::TimestampUtc
- Defined in:
- lib/pg/text_decoder/timestamp.rb
Overview
Convenience classes for timezone options
Constant Summary
Constants inherited from Coder
Coder::FORMAT_ERROR_MASK, Coder::FORMAT_ERROR_TO_PARTIAL, Coder::FORMAT_ERROR_TO_RAISE, Coder::FORMAT_ERROR_TO_STRING, Coder::TIMESTAMP_APP_LOCAL, Coder::TIMESTAMP_APP_UTC, Coder::TIMESTAMP_DB_LOCAL, Coder::TIMESTAMP_DB_UTC
Instance Attribute Summary
Attributes inherited from Coder
Instance Method Summary collapse
-
#initialize(hash = {}, **kwargs) ⇒ TimestampUtc
constructor
A new instance of TimestampUtc.
Methods inherited from Coder
#==, #dup, #flags, #flags=, #format, #format=, #inspect, #inspect_short, #marshal_dump, #marshal_load, #oid, #oid=, #to_h
Constructor Details
#initialize(hash = {}, **kwargs) ⇒ TimestampUtc
Returns a new instance of TimestampUtc.
8 9 10 11 |
# File 'lib/pg/text_decoder/timestamp.rb', line 8 def initialize(hash={}, **kwargs) warn("PG::Coder.new(hash) is deprecated. Please use keyword arguments instead! Called from #{caller.first}", category: :deprecated) unless hash.empty? super(**hash, **kwargs, flags: PG::Coder::TIMESTAMP_DB_UTC | PG::Coder::TIMESTAMP_APP_UTC) end |