Class: Checksum Private
- Inherits:
-
Object
- Object
- Checksum
- Extended by:
- Forwardable
- Defined in:
- Library/Homebrew/checksum.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
A formula's checksum.
Constant Summary collapse
- TYPES =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
[:sha256].freeze
Instance Attribute Summary collapse
- #hash_type ⇒ Object readonly private
- #hexdigest ⇒ Object readonly private
Instance Method Summary collapse
- #==(other) ⇒ Object private
-
#initialize(hash_type, hexdigest) ⇒ Checksum
constructor
private
A new instance of Checksum.
Constructor Details
#initialize(hash_type, hexdigest) ⇒ Checksum
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Checksum.
14 15 16 17 |
# File 'Library/Homebrew/checksum.rb', line 14 def initialize(hash_type, hexdigest) @hash_type = hash_type @hexdigest = hexdigest end |
Instance Attribute Details
#hash_type ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
10 11 12 |
# File 'Library/Homebrew/checksum.rb', line 10 def hash_type @hash_type end |
#hexdigest ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
10 11 12 |
# File 'Library/Homebrew/checksum.rb', line 10 def hexdigest @hexdigest end |
Instance Method Details
#==(other) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
21 22 23 |
# File 'Library/Homebrew/checksum.rb', line 21 def ==(other) hash_type == other&.hash_type && hexdigest == other.hexdigest end |