Sha256: bf9e6138024bd6d56a23e0961542e9308fa3fe97983d4f904dd63cea99413f44

Contents?: true

Size: 599 Bytes

Versions: 6

Compression:

Stored size: 599 Bytes

Contents

# frozen_string_literal: true

require 'travis/client/weak_entity'

module Travis
  module Client
    class Cache < WeakEntity
      # @!parse attr_reader :repository_id, :size, :slug, :branch, :last_modified
      attributes :repository_id, :size, :slug, :branch, :last_modified
      time :last_modified

      # @!parse attr_reader :repository
      has :repository

      one :cache
      many :caches

      def delete
        repository.delete_caches(branch:, match: slug)
      end

      def inspect_info
        [repository.slug, branch, slug].compact.join(' ')
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
travis-1.14.0 lib/travis/client/cache.rb
travis-1.13.3 lib/travis/client/cache.rb
travis-1.13.2 lib/travis/client/cache.rb
travis-1.13.1 lib/travis/client/cache.rb
travis-1.13.0 lib/travis/client/cache.rb
travis-1.12.0 lib/travis/client/cache.rb