Sha256: 86dbab71c0acbdae8b1f8bcdfe92e373442490454770b246caf92e6e129a2d97
Contents?: true
Size: 905 Bytes
Versions: 12
Compression:
Stored size: 905 Bytes
Contents
module Rad::Controller::Abstract inherit Rad::Filters inherit Rad::Controller::Abstract::Render, Rad::Controller::Abstract::Micelaneous inject workspace: :workspace, logger: :logger def params workspace.params end # def response # workspace.response # end module ClassMethods inject workspace: :workspace, logger: :logger def controller_name self.namespace ? "#{self.namespace.name}::#{self.alias}" : self.alias end def helper *args args.to_a.each do |mod| mod.must_be.a Module context_class.inherit mod end end def helper_method *args args = args.first if args.size == 1 and args.first.is_a?(Array) # args.each{|m| m.to_s.must_be.in self.instance_methods} args.each do |m| context_class.delegate m, to: :controller end end end end
Version data entries
12 entries across 12 versions & 1 rubygems