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

Version Path
inbox-0.17.3 lib/time_attr_accessor.rb
inbox-0.17.2 lib/time_attr_accessor.rb
nylas-0.17.2 lib/time_attr_accessor.rb
inbox-0.17.1 lib/time_attr_accessor.rb
nylas-0.17.1 lib/time_attr_accessor.rb
nylas-0.17.0 lib/time_attr_accessor.rb
inbox-0.17.0 lib/time_attr_accessor.rb
inbox-0.16.1 lib/time_attr_accessor.rb
nylas-0.16.1 lib/time_attr_accessor.rb
nylas-0.16.0 lib/time_attr_accessor.rb
inbox-0.16.0 lib/time_attr_accessor.rb
inbox-0.15.8 lib/time_attr_accessor.rb
nylas-0.15.7d lib/time_attr_accessor.rb
inbox-0.15.7d lib/time_attr_accessor.rb
nylas-0.15.7c lib/time_attr_accessor.rb
nylas-0.15.7b lib/time_attr_accessor.rb
nylas-0.15.7 lib/time_attr_accessor.rb
nylas-0.15.6 lib/time_attr_accessor.rb
nylas-0.15.5 lib/time_attr_accessor.rb
inbox-0.15.4 lib/time_attr_accessor.rb