Sha256: 329ad79c4b2346013ffbbd9de0fef9dbeb03c17b69e0e8e4733805ab892a1ac1
Contents?: true
Size: 642 Bytes
Versions: 10
Compression:
Stored size: 642 Bytes
Contents
require 'forwardable' module Pakyow # Include in a module to define route mixins # that can be included into route sets. module Routes def self.included(base) raise StandardError, "Pakyow::Routes is intended to be included only in other modules" if base.is_a?(Class) base.extend(ClassMethods) base.instance_variable_set(:@route_eval, RouteEval.new) end module ClassMethods attr_reader :route_eval extend Forwardable def_delegators :@route_eval, :fn, :default, :get, :put, :post, :delete, :handler, :group, :namespace, :template, :action, :expand end end end
Version data entries
10 entries across 10 versions & 1 rubygems