Module: Bop::InstanceMethods

Defined in:
lib/bop.rb

Instance Method Summary collapse

Instance Method Details

#find_page(route) ⇒ Object



35
36
37
# File 'lib/bop.rb', line 35

def find_page(route)
  pages.find_by_route(route)
end

#find_page!(route) ⇒ Object



30
31
32
33
# File 'lib/bop.rb', line 30

def find_page!(route)
  raise Bop::MissingPageError unless page = find_page(route)
  page
end

#root_pageObject



26
27
28
# File 'lib/bop.rb', line 26

def root_page
  find_page("")
end

#root_page!Object



21
22
23
24
# File 'lib/bop.rb', line 21

def root_page!
  raise Bop::MissingRootPageError unless page = root_page
  page
end