Module: Pekky::Tree

Defined in:
lib/pekky/tree.rb

Defined Under Namespace

Classes: PageMissingError

Class Method Summary collapse

Class Method Details

.[](name) ⇒ Object



12
13
14
# File 'lib/pekky/tree.rb', line 12

def self.[](name)
  @map[name]
end

.add(pages) ⇒ Object



20
21
22
23
24
25
26
# File 'lib/pekky/tree.rb', line 20

def self.add(pages)
  @pages.clear
  pages.each do |p| 
    @map[p.name] = p 
    add_to_tree(p, pages)
  end
end

.pagesObject



16
17
18
# File 'lib/pekky/tree.rb', line 16

def self.pages
  @pages
end