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.



296
297
298
# File 'lib/origami/catalog.rb', line 296

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