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.


320
321
322
# File 'lib/origami/catalog.rb', line 320

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