Class: AlertsPage
- Inherits:
-
UnderOs::Page
- Object
- UnderOs::Page
- AlertsPage
- Defined in:
- app/pages/alerts_page.rb
Instance Attribute Summary
Attributes inherited from UnderOs::Page
Instance Method Summary collapse
-
#initialize ⇒ AlertsPage
constructor
A new instance of AlertsPage.
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
Constructor Details
#initialize ⇒ AlertsPage
Returns a new instance of AlertsPage.
2 3 4 5 6 7 8 9 10 11 12 13 |
# File 'app/pages/alerts_page.rb', line 2 def initialize find('#buttons button').each_with_index do |, index| .on :tap do case index when 1 then Alert.new(title: "Error", message: .text) when 2 then Alert.new(message: .text, button: "Doh...") when 3 then Alert.new(message: .text, buttons: ["Option 1", "Option 2"]) else Alert.new(.text) end end end end |