Class: Depot::Inspection

Inherits:
Struct
  • Object
show all
Defined in:
lib/depot/inspection.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#confidenceObject

Returns the value of attribute confidence

Returns:

  • (Object)

    the current value of confidence



4
5
6
# File 'lib/depot/inspection.rb', line 4

def confidence
  @confidence
end

#display_nameObject

Returns the value of attribute display_name

Returns:

  • (Object)

    the current value of display_name



4
5
6
# File 'lib/depot/inspection.rb', line 4

def display_name
  @display_name
end

#executableObject

Returns the value of attribute executable

Returns:

  • (Object)

    the current value of executable



4
5
6
# File 'lib/depot/inspection.rb', line 4

def executable
  @executable
end

#formatObject

Returns the value of attribute format

Returns:

  • (Object)

    the current value of format



4
5
6
# File 'lib/depot/inspection.rb', line 4

def format
  @format
end

#inputObject

Returns the value of attribute input

Returns:

  • (Object)

    the current value of input



4
5
6
# File 'lib/depot/inspection.rb', line 4

def input
  @input
end

#metadataObject

Returns the value of attribute metadata

Returns:

  • (Object)

    the current value of metadata



4
5
6
# File 'lib/depot/inspection.rb', line 4

def 
  @metadata
end

#risksObject

Returns the value of attribute risks

Returns:

  • (Object)

    the current value of risks



4
5
6
# File 'lib/depot/inspection.rb', line 4

def risks
  @risks
end

#sha256Object

Returns the value of attribute sha256

Returns:

  • (Object)

    the current value of sha256



4
5
6
# File 'lib/depot/inspection.rb', line 4

def sha256
  @sha256
end

#sizeObject

Returns the value of attribute size

Returns:

  • (Object)

    the current value of size



4
5
6
# File 'lib/depot/inspection.rb', line 4

def size
  @size
end

#warningsObject

Returns the value of attribute warnings

Returns:

  • (Object)

    the current value of warnings



4
5
6
# File 'lib/depot/inspection.rb', line 4

def warnings
  @warnings
end

Instance Method Details

#appimage?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/depot/inspection.rb', line 17

def appimage?
  format == "appimage"
end

#archive?Boolean

Returns:

  • (Boolean)


25
26
27
# File 'lib/depot/inspection.rb', line 25

def archive?
  %w[tar.gz tar.xz tar.zst].include?(format)
end

#deb?Boolean

Returns:

  • (Boolean)


21
22
23
# File 'lib/depot/inspection.rb', line 21

def deb?
  format == "deb"
end

#flatpakref?Boolean

Returns:

  • (Boolean)


33
34
35
# File 'lib/depot/inspection.rb', line 33

def flatpakref?
  format == "flatpakref"
end

#rpm?Boolean

Returns:

  • (Boolean)


29
30
31
# File 'lib/depot/inspection.rb', line 29

def rpm?
  format == "rpm"
end

#to_hObject



37
38
39
40
41
42
43
44
45
46
47
48
49
50
# File 'lib/depot/inspection.rb', line 37

def to_h
  {
    "input" => input,
    "format" => format,
    "confidence" => confidence,
    "display_name" => display_name,
    "sha256" => sha256,
    "size" => size,
    "executable" => executable,
    "metadata" => ,
    "warnings" => warnings,
    "risks" => risks
  }
end