Class: Reactive::WxOutput::DefaultHandler

Inherits:
OutputHandler::Base
  • Object
show all
Includes:
Binder
Defined in:
lib/reactive-wx/default_handler.rb

Instance Method Summary collapse

Methods included from Binder

#do_request

Methods included from Helpers::FormsHelper

#form_name_and_container, #form_to_param, #forms_to_params

Instance Method Details

#default_treatmentObject



14
15
16
# File 'lib/reactive-wx/default_handler.rb', line 14

def default_treatment
  :run
end

#runObject



18
19
20
21
22
23
24
25
26
27
28
# File 'lib/reactive-wx/default_handler.rb', line 18

def run
  copy_ivars(response.variables)
  instance_eval("#{locals_code}\n#{response.body}", request_name, 0)
rescue Exception => e
  if HandlerError === e
    e.sub_template_of(request_name)
    raise e
  else
    raise HandlerError.new(request_name, response.body, e)
  end
end