Sha256: 71804aa1d2d10283a7a68c2c76919491972a73cd39cdf9797ec16c47cad9bda3

Contents?: true

Size: 439 Bytes

Versions: 9

Compression:

Stored size: 439 Bytes

Contents

module Assets

  # Abstract base class for asset
  class Asset
    include Adamantium, Anima.new(:name, :mime, :created_at, :size, :sha1, :body)

    # Test if asset was fresh at specific point of time
    #
    # @param [Time] time
    #
    # @return [true]
    #   if asset is fresh at time
    #
    # @return [false]
    #   otherwise
    #
    # @api private
    #
    def fresh_at?(time)
      time >= created_at
    end

  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
mbj-assets-0.0.11 lib/assets/asset.rb
mbj-assets-0.0.10 lib/assets/asset.rb
mbj-assets-0.0.9 lib/assets/asset.rb
mbj-assets-0.0.8 lib/assets/asset.rb
mbj-assets-0.0.7 lib/assets/asset.rb
mbj-assets-0.0.6 lib/assets/asset.rb
mbj-assets-0.0.5 lib/assets/asset.rb
mbj-assets-0.0.4 lib/assets/asset.rb
mbj-assets-0.0.3 lib/assets/asset.rb