Sha256: 46b5a919f6f0593b1e159346705b0f3bf1014a39897bfc7d24755d6d27d59387
Contents?: true
Size: 1.02 KB
Versions: 7
Compression:
Stored size: 1.02 KB
Contents
# Includes files into the class to allow it to minimally delegates to a web controller module Merb module Mixins module WebController def self.included(base) [:content_type, :web_controller].each do |attr| base.send(:attr_accessor, attr) end base.send(:include, InstanceMethods) base.send(:extend, ClassMethods) end module InstanceMethods def request @web_controller.request end def cookies @web_controller.cookies end def headers @web_controller.headers end def session @web_controller.session end def response @web_controller.response end def route request.route end def url(name, *args) @web_controller.url(name, *args) end end module ClassMethods end end # WebController end # Mixins end # Merb
Version data entries
7 entries across 7 versions & 2 rubygems