INNER CODE UNIT · Ruby

object_list

noraj/haiti · lib/haiti.rb:64

    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
  # @param hash [String] the hash to identify
  # @return [Array<Chf>] list of {Chf} objects, representing the identified
  #   hashes
  def identify(hash)
    res = []
    PROTOTYPES.each do |prototype|

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…