Sha256: 0ff0beb17eb9e77d96af04c644548d11b67288d727bfcfc1ba6953e04362ef82
Contents?: true
Size: 458 Bytes
Versions: 2
Compression:
Stored size: 458 Bytes
Contents
module Fog module Attributes class Timestamp < Default def create_setter model.class_eval <<-EOS, __FILE__, __LINE__ def #{name}=(new_#{name}) if new_#{name}.respond_to?(:to_i) attributes[:#{name}] = Fog::Time.at(new_#{name}.to_i) else attributes[:#{name}] = Fog::Time.parse(new_#{name}.to_s) end end EOS end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
fog-core-1.24.0 | lib/fog/core/attributes/timestamp.rb |
fog-core-1.23.0 | lib/fog/core/attributes/timestamp.rb |