Class: Checksum
- Inherits:
-
Object
- Object
- Checksum
- Extended by:
- Forwardable
- Defined in:
- Library/Homebrew/checksum.rb
Constant Summary
- TYPES =
[:sha256].freeze
Instance Attribute Summary collapse
-
#hash_type ⇒ Object
readonly
Returns the value of attribute hash_type.
-
#hexdigest ⇒ Object
readonly
Returns the value of attribute hexdigest.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(hash_type, hexdigest) ⇒ Checksum
constructor
A new instance of Checksum.
Constructor Details
#initialize(hash_type, hexdigest) ⇒ Checksum
Returns a new instance of Checksum
8 9 10 11 |
# File 'Library/Homebrew/checksum.rb', line 8 def initialize(hash_type, hexdigest) @hash_type = hash_type @hexdigest = hexdigest end |
Instance Attribute Details
#hash_type ⇒ Object (readonly)
Returns the value of attribute hash_type
4 5 6 |
# File 'Library/Homebrew/checksum.rb', line 4 def hash_type @hash_type end |
#hexdigest ⇒ Object (readonly)
Returns the value of attribute hexdigest
4 5 6 |
# File 'Library/Homebrew/checksum.rb', line 4 def hexdigest @hexdigest end |
Instance Method Details
#==(other) ⇒ Object
15 16 17 |
# File 'Library/Homebrew/checksum.rb', line 15 def ==(other) hash_type == other.hash_type && hexdigest == other.hexdigest end |