Class: HomePage

Inherits:
UnderOs::Page show all
Defined in:
app/pages/home_page.rb

Instance Attribute Summary

Attributes inherited from UnderOs::Page

#_, #stylesheet

Instance Method Summary collapse

Methods inherited from UnderOs::Page

#alert, #build_layout, #compile_styles, #history, layout, #name, #navbar, new, #repaint, #setup_wrap, #title, #title=, #view, #view=

Methods included from UnderOs::Events

#emit, #off, #on

Constructor Details

#initializeHomePage

Returns a new instance of HomePage.



3
4
5
6
7
8
9
10
# File 'app/pages/home_page.rb', line 3

def initialize
  find('#buttons button').each do |button|
    button.on :tap do
      page = (button.data('page').capitalize + "Page").constantize
      history << page.new
    end
  end
end