Class: Bsdkrun::CacheEntry

Inherits:
Struct
  • Object
show all
Defined in:
lib/bsdkrun/cache.rb

Overview

A stored cache entry, as cache ls reports it.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#compressionObject

Returns the value of attribute compression

Returns:

  • (Object)

    the current value of compression



7
8
9
# File 'lib/bsdkrun/cache.rb', line 7

def compression
  @compression
end

#createdObject

Returns the value of attribute created

Returns:

  • (Object)

    the current value of created



7
8
9
# File 'lib/bsdkrun/cache.rb', line 7

def created
  @created
end

#digestObject

Returns the value of attribute digest

Returns:

  • (Object)

    the current value of digest



7
8
9
# File 'lib/bsdkrun/cache.rb', line 7

def digest
  @digest
end

#keyObject

Returns the value of attribute key

Returns:

  • (Object)

    the current value of key



7
8
9
# File 'lib/bsdkrun/cache.rb', line 7

def key
  @key
end

#pathObject

Returns the value of attribute path

Returns:

  • (Object)

    the current value of path



7
8
9
# File 'lib/bsdkrun/cache.rb', line 7

def path
  @path
end

#sizeObject

Returns the value of attribute size

Returns:

  • (Object)

    the current value of size



7
8
9
# File 'lib/bsdkrun/cache.rb', line 7

def size
  @size
end

Class Method Details

.from(row) ⇒ Object



8
9
10
11
12
13
14
15
16
17
# File 'lib/bsdkrun/cache.rb', line 8

def self.from(row)
  new(
    key: row["key"].to_s,
    path: row["path"].to_s,
    compression: row["compression"].to_s,
    size: row["size"].to_i,
    created: row["created"].to_i,
    digest: row["digest"].to_s
  )
end