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



103
104
105
# File 'lib/ios/sugarcube-factories/uialertcontroller.rb', line 103

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

Instance Method Details

#call(button) ⇒ Object



107
108
109
# File 'lib/ios/sugarcube-factories/uialertcontroller.rb', line 107

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