INNER CODE UNIT · Ruby
list
noraj/haiti · lib/haiti.rb:58
def list
PROTOTYPES.flat_map { |d| d['modes'].map { |m| m['name'] } }.sort { |a, b| a.downcase <=> b.downcase }.uniq
end
# List all hash types available as <Chf> object
# @return [Array<Chf>] a list of hash types object
def object_list
(PROTOTYPES.flat_map do |d|
d['modes'].map do |m|
Chf.new(m)
end
end).sort { |a, b| a.name.downcase <=> b.name.downcase }.uniq
end
end
private
# Check which hash types are matching the provided hash