class Goofy::Controller
Define Controller
Class
Public Class Methods
construct(arg)
click to toggle source
# File lib/goofy/controller/base.rb, line 4 def self.construct(arg) self.new(arg).entry end
new(app)
click to toggle source
# File lib/goofy/controller/base.rb, line 8 def initialize(app) @app = app end
Public Instance Methods
entry()
click to toggle source
# File lib/goofy/controller/callbacks.rb, line 11 def entry run_hooks :response do # Call response method with running callbacks response end end
method_missing(name, *args, &block)
click to toggle source
# File lib/goofy/controller/base.rb, line 16 def method_missing(name, *args, &block) @app.send(name, *args, &block) end
response()
click to toggle source
# File lib/goofy/controller/base.rb, line 12 def response res.write "<h3>You should define `response` instance method on your controller class!</h3>" end