Sha256: f3967a4371078ab1c8c3209a7ded972080cb9b3dc58e89115aa118b5ad89f0df

Contents?: true

Size: 533 Bytes

Versions: 16

Compression:

Stored size: 533 Bytes

Contents

module Vfs
  class Entry
    module SpecialAttributes
      def created_at
        safe_get :created_at
      end
      
      def updated_at
        safe_get :updated_at
      end
      
      protected
        def safe_get name
          if value = get[name]
            value
          else
            if get[:dir] or get[:file]
              raise "attribute :#{name} not supported for #{storage.class}!"
            else
              raise "entry #{path} not exist!"
            end
          end
        end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
vfs-0.3.12 lib/vfs/entries/entry/special_attributes.rb
vfs-0.3.11 lib/vfs/entries/entry/special_attributes.rb
vfs-0.3.10 lib/vfs/entries/entry/special_attributes.rb
vfs-0.3.9 lib/vfs/entries/entry/special_attributes.rb
vfs-0.3.8 lib/vfs/entries/entry/special_attributes.rb
vfs-0.3.7 lib/vfs/entries/entry/special_attributes.rb
vfs-0.3.6 lib/vfs/entries/entry/special_attributes.rb
vfs-0.3.5 lib/vfs/entries/entry/special_attributes.rb
vfs-0.3.4 lib/vfs/entries/entry/special_attributes.rb
vfs-0.3.3 lib/vfs/entries/entry/special_attributes.rb
vfs-0.3.2 lib/vfs/entries/entry/special_attributes.rb
vfs-0.3.1 lib/vfs/entries/entry/special_attributes.rb
vfs-0.3 lib/vfs/entries/entry/special_attributes.rb
vfs-0.2.1 lib/vfs/entries/entry/special_attributes.rb
vfs-0.2 lib/vfs/entries/entry/special_attributes.rb
vfs-0.1.1 lib/vfs/entries/entry/special_attributes.rb