Class: BW::UIAlertView::ClickedButton

Inherits:
Object
  • Object
show all
Defined in:
motion/ui/ui_alert_view.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(alert, index) ⇒ ClickedButton

Returns a new instance of ClickedButton



113
114
115
116
117
# File 'motion/ui/ui_alert_view.rb', line 113

def initialize(alert, index)
  @index  = index
  @title  = alert.buttonTitleAtIndex(index)
  @cancel = alert.cancelButtonIndex == index
end

Instance Attribute Details

#indexObject (readonly)

Returns the value of attribute index



119
120
121
# File 'motion/ui/ui_alert_view.rb', line 119

def index
  @index
end

#titleObject (readonly)

Returns the value of attribute title



119
120
121
# File 'motion/ui/ui_alert_view.rb', line 119

def title
  @title
end

Instance Method Details

#cancel?Boolean

Returns:

  • (Boolean)


120
# File 'motion/ui/ui_alert_view.rb', line 120

def cancel?; @cancel end