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



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

def language
  @language
end

#licenseObject

Returns the value of attribute license

Returns:

  • (Object)

    the current value of license



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

def license
  @license
end

#pathObject

Returns the value of attribute path

Returns:

  • (Object)

    the current value of path



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

def path
  @path
end

#sha256Object

Returns the value of attribute sha256

Returns:

  • (Object)

    the current value of sha256



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

def sha256
  @sha256
end

#sizeObject

Returns the value of attribute size

Returns:

  • (Object)

    the current value of size



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

def size
  @size
end

#sourceObject

Returns the value of attribute source

Returns:

  • (Object)

    the current value of source



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

def source
  @source
end

#typeObject

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



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

def type
  @type
end

Instance Method Details

#verify?(content) ⇒ Boolean

Returns:

  • (Boolean)


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

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