class Appom::Section

Attributes

parent[R]
root_element[R]

Public Class Methods

new(parent, root_element) click to toggle source
# File lib/appom/section.rb, line 9
def initialize(parent, root_element)
  @parent = parent
  @root_element = root_element
end

Public Instance Methods

page() click to toggle source
Calls superclass method
# File lib/appom/section.rb, line 14
def page
  root_element || super
end
parent_page() click to toggle source
# File lib/appom/section.rb, line 18
def parent_page
  candidate_page = parent
  until candidate_page.is_a?(Appom::Page)
    candidate_page = candidate_page.parent
  end
  candidate_page
end