Class: HashIdentifier
- Inherits:
-
Object
- Object
- HashIdentifier
- Includes:
- Version
- Defined in:
- lib/haiti.rb,
lib/haiti/hash.rb
Overview
The global Hash Identifier class
Defined Under Namespace
Classes: Chf
Constant Summary collapse
- PROTOTYPES =
JSON.parse(File.read(File.join(__dir__, '../data/prototypes.json')))
Constants included from Version
Instance Attribute Summary collapse
-
#hash ⇒ String
readonly
The hash (as provided).
-
#type ⇒ Array<Chf>
readonly
List of Chf objects, representing the identified hashes.
Instance Method Summary collapse
-
#initialize(hash) ⇒ HashIdentifier
constructor
A new instance of hash identifier.
Constructor Details
#initialize(hash) ⇒ HashIdentifier
A new instance of hash identifier
26 27 28 29 |
# File 'lib/haiti.rb', line 26 def initialize(hash) @hash = hash @type = identify(hash) end |