Sha256: 2378bfd446e862da9cefd01bf29d4ee467b54bc2457e33037917ab8a73403695
Contents?: true
Size: 256 Bytes
Versions: 46
Compression:
Stored size: 256 Bytes
Contents
module Inbox module TimeAttrAccessor def time_attr_accessor(attr) parameter attr define_method "#{attr}=" do |value| if value instance_variable_set "@#{attr}", Time.at(value).utc end end end end end
Version data entries
46 entries across 46 versions & 2 rubygems