Class: Origami::NameLeaf

Inherits:
Object
  • Object
show all
Defined in:
lib/origami/catalog.rb

Overview

Class representing a leaf in a Name tree.

Instance Method Summary collapse

Constructor Details

#initialize(hash = {}) ⇒ NameLeaf

Creates a new leaf in a Name tree.

hash

A hash of couples, associating a Name with an Reference.



294
295
296
# File 'lib/origami/catalog.rb', line 294

def initialize(hash = {})
  super(hash.flat_map { |name, obj| [name.dup, obj] })
end