Class: Bsdkrun::ImageInfo

Inherits:
Data
  • Object
show all
Defined in:
lib/bsdkrun/types.rb

Overview

An image as reported by bsdkrun images --json.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#created_atObject (readonly)

Returns the value of attribute created_at

Returns:

  • (Object)

    the current value of created_at



50
51
52
# File 'lib/bsdkrun/types.rb', line 50

def created_at
  @created_at
end

#digestObject (readonly)

Returns the value of attribute digest

Returns:

  • (Object)

    the current value of digest



50
51
52
# File 'lib/bsdkrun/types.rb', line 50

def digest
  @digest
end

#idObject (readonly)

Returns the value of attribute id

Returns:

  • (Object)

    the current value of id



50
51
52
# File 'lib/bsdkrun/types.rb', line 50

def id
  @id
end

#referenceObject (readonly)

Returns the value of attribute reference

Returns:

  • (Object)

    the current value of reference



50
51
52
# File 'lib/bsdkrun/types.rb', line 50

def reference
  @reference
end

#rootfsObject (readonly)

Returns the value of attribute rootfs

Returns:

  • (Object)

    the current value of rootfs



50
51
52
# File 'lib/bsdkrun/types.rb', line 50

def rootfs
  @rootfs
end

#sizeObject (readonly)

Returns the value of attribute size

Returns:

  • (Object)

    the current value of size



50
51
52
# File 'lib/bsdkrun/types.rb', line 50

def size
  @size
end

Class Method Details

.from_row(row) ⇒ ImageInfo

Parameters:

  • row (Hash)

Returns:



53
54
55
56
57
58
59
60
61
62
# File 'lib/bsdkrun/types.rb', line 53

def self.from_row(row)
  new(
    id: row["id"].to_s,
    reference: row["reference"].to_s,
    digest: row["digest"].to_s,
    size: row["size"].to_i,
    rootfs: row["rootfs"].to_s,
    created_at: row["created_at"].to_i
  )
end