Class: Kotoshu::Integrity::Manifest::Entry

Inherits:
Struct
  • Object
show all
Defined in:
lib/kotoshu/integrity/manifest.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#languageObject

Returns the value of attribute language

Returns:

  • (Object)

    the current value of language



37
38
39
# File 'lib/kotoshu/integrity/manifest.rb', line 37

def language
  @language
end

#licenseObject

Returns the value of attribute license

Returns:

  • (Object)

    the current value of license



37
38
39
# File 'lib/kotoshu/integrity/manifest.rb', line 37

def license
  @license
end

#pathObject

Returns the value of attribute path

Returns:

  • (Object)

    the current value of path



37
38
39
# File 'lib/kotoshu/integrity/manifest.rb', line 37

def path
  @path
end

#sha256Object

Returns the value of attribute sha256

Returns:

  • (Object)

    the current value of sha256



37
38
39
# File 'lib/kotoshu/integrity/manifest.rb', line 37

def sha256
  @sha256
end

#sizeObject

Returns the value of attribute size

Returns:

  • (Object)

    the current value of size



37
38
39
# File 'lib/kotoshu/integrity/manifest.rb', line 37

def size
  @size
end

#sourceObject

Returns the value of attribute source

Returns:

  • (Object)

    the current value of source



37
38
39
# File 'lib/kotoshu/integrity/manifest.rb', line 37

def source
  @source
end

#typeObject

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



37
38
39
# File 'lib/kotoshu/integrity/manifest.rb', line 37

def type
  @type
end

Instance Method Details

#verify?(content) ⇒ Boolean

Returns:

  • (Boolean)


39
40
41
# File 'lib/kotoshu/integrity/manifest.rb', line 39

def verify?(content)
  Digest::SHA256.hexdigest(content) == sha256
end