Class: SugarCube::AlertViewDelegate
- Inherits:
-
Object
- Object
- SugarCube::AlertViewDelegate
- Defined in:
- lib/sugarcube/uialertview.rb
Instance Attribute Summary collapse
-
#buttons ⇒ Object
Returns the value of attribute buttons.
-
#on_cancel ⇒ Object
Returns the value of attribute on_cancel.
-
#on_success ⇒ Object
Returns the value of attribute on_success.
Instance Method Summary collapse
Instance Attribute Details
#buttons ⇒ Object
Returns the value of attribute buttons.
50 51 52 |
# File 'lib/sugarcube/uialertview.rb', line 50 def @buttons end |
#on_cancel ⇒ Object
Returns the value of attribute on_cancel.
51 52 53 |
# File 'lib/sugarcube/uialertview.rb', line 51 def on_cancel @on_cancel end |
#on_success ⇒ Object
Returns the value of attribute on_success.
52 53 54 |
# File 'lib/sugarcube/uialertview.rb', line 52 def on_success @on_success end |
Instance Method Details
#alertView(alert, didDismissWithButtonIndex: index) ⇒ Object
54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
# File 'lib/sugarcube/uialertview.rb', line 54 def alertView(alert, didDismissWithButtonIndex:index) if on_cancel on_cancel.call elsif on_success if on_success.arity == 0 on_success.call else = [index] on_success.call() end end self.send(:autorelease) end |