module ActionFramework::NextController
Attributes
klass[RW]
method[RW]
neep[RW]
nextElementPlace[RW]
nexts[RW]
this[W]
Public Instance Methods
erb(templatename)
click to toggle source
# File lib/actionframework/nextcontroller.rb, line 67 def erb(templatename) ActionFramework::TemplateManager::Erb.render(templatename,self) end
goNext(ctx)
click to toggle source
# File lib/actionframework/nextcontroller.rb, line 44 def goNext(ctx) raise ActionFramework::NextControllerError,"No \"next\" found, check your routes.rb" if(ctx.nexts.length < ctx.neep+1) klass,method = ctx.nexts[ctx.neep].split("#")[0],ctx.nexts[ctx.neep].split("#")[1] klass_inst = Object.const_get(klass).new klass_inst.this = ctx.this klass_inst.nexts = ctx.nexts klass_inst.setNext(ctx.neep+1) klass_inst.send(method) end
setNext(nextElementPlace)
click to toggle source
# File lib/actionframework/nextcontroller.rb, line 56 def setNext(nextElementPlace) @neep = nextElementPlace end
setup(req,res,url,nexts)
click to toggle source
# File lib/actionframework/nextcontroller.rb, line 37 def setup(req,res,url,nexts) this.request = req this.response = res this.url = url @nexts = nexts end
this()
click to toggle source
# File lib/actionframework/nextcontroller.rb, line 60 def this if(@this.nil?) @this = ActionFramework::ThisObject.new end @this end