INNER CODE UNIT · Ruby
HashIdentifier
noraj/haiti · lib/haiti.rb:10
class HashIdentifier
# Constants
PROTOTYPES = JSON.parse(File.read(File.join(__dir__, '../data/prototypes.json')))
COMMONS = JSON.parse(File.read(File.join(__dir__, '../data/commons.json')))
# @return [String] the hash (as provided)
# @example
# '5f4dcc3b5aa765d61d8327deb882cf99'
attr_reader :hash
# @return [Array<Chf>] list of {Chf} objects, representing the identified
# hashes
attr_reader :type
# A new instance of hash identifier
# @param hash [String] the hash to identify
def initialize(hash)
@hash = hash