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
nylas-2.0.1 lib/time_attr_accessor.rb
inbox-2.0.1 lib/time_attr_accessor.rb
nylas-2.0.0 lib/time_attr_accessor.rb
inbox-2.0.0 lib/time_attr_accessor.rb
nylas-1.3.0 lib/time_attr_accessor.rb
inbox-1.3.0 lib/time_attr_accessor.rb
nylas-1.2.1 lib/time_attr_accessor.rb
inbox-1.2.1 lib/time_attr_accessor.rb
nylas-1.1.0 lib/time_attr_accessor.rb
inbox-1.1.0 lib/time_attr_accessor.rb
nylas-1.0.0 lib/time_attr_accessor.rb
inbox-1.0.0 lib/time_attr_accessor.rb
nylas-0.18.2 lib/time_attr_accessor.rb
inbox-0.18.2 lib/time_attr_accessor.rb
nylas-0.18.1 lib/time_attr_accessor.rb
inbox-0.18.1 lib/time_attr_accessor.rb
inbox-0.18.0 lib/time_attr_accessor.rb
nylas-0.18.0 lib/time_attr_accessor.rb
nylas-0.17.4 lib/time_attr_accessor.rb
inbox-0.17.4 lib/time_attr_accessor.rb