Class: Sanford::SanfordRunner

Inherits:
Runner
  • Object
show all
Defined in:
lib/sanford/sanford_runner.rb

Constant Summary

Constants inherited from Runner

Runner::DEFAULT_DATA, Runner::DEFAULT_STATUS_CODE, Runner::DEFAULT_STATUS_MSG

Instance Attribute Summary

Attributes inherited from Runner

#handler, #handler_class, #logger, #params, #request, #router, #template_source

Instance Method Summary collapse

Methods inherited from Runner

#data, #halt, #initialize, #partial, #render, #status, #to_response

Constructor Details

This class inherits a constructor from Sanford::Runner

Instance Method Details

#runObject



7
8
9
10
11
12
13
14
# File 'lib/sanford/sanford_runner.rb', line 7

def run
  catch(:halt) do
    self.handler.sanford_run_callback 'before'
    catch(:halt){ self.handler.sanford_init; self.handler.sanford_run }
    self.handler.sanford_run_callback 'after'
  end
  self.to_response
end