Class: SugarCube::UIAlertControllerCallbackHelper

Inherits:
Object
  • Object
show all
Defined in:
lib/ios/sugarcube-factories/uialertcontroller.rb

Instance Method Summary collapse

Constructor Details

#initialize(callback) ⇒ UIAlertControllerCallbackHelper

Returns a new instance of UIAlertControllerCallbackHelper.



120
121
122
# File 'lib/ios/sugarcube-factories/uialertcontroller.rb', line 120

def initialize(callback)
  @callback = callback.respond_to?('weak!') ? callback.weak! : callback
end

Instance Method Details

#call(button) ⇒ Object



124
125
126
# File 'lib/ios/sugarcube-factories/uialertcontroller.rb', line 124

def call(button)
  @callback.call(button)
end