Class: LockersPage

Inherits:
UnderOs::Page show all
Defined in:
app/pages/lockers_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

#initializeLockersPage

Returns a new instance of LockersPage.



2
3
4
5
# File 'app/pages/lockers_page.rb', line 2

def initialize
  first('#buttons #b1').on(:tap){ show_simple_locker }
  first('#buttons #b2').on(:tap){ show_locker_with_label }
end

Instance Method Details

#show_locker_with_labelObject



12
13
14
15
# File 'app/pages/lockers_page.rb', line 12

def show_locker_with_label
  @locker = Locker.new(text: "Wait...").show
  2.seconds.later { @locker.hide }
end

#show_simple_lockerObject



7
8
9
10
# File 'app/pages/lockers_page.rb', line 7

def show_simple_locker
  @locker = Locker.new.show
  2.seconds.later { @locker.hide }
end