Sha256: 87fbb731d6b0231e8c225ee5c361865b5a5bdb3d40067f1c5a9fdfd5dcefe813

Contents?: true

Size: 413 Bytes

Versions: 1

Compression:

Stored size: 413 Bytes

Contents

module ShouldaRouting
  module Namespaces
    class Base

      attr_accessor :current, :options, :block

      def initialize *args, &block
        @options = args.extract_options!
        @current = args
        @block   = block
      end

      def test!
        Routes::STACK.namespaces.push(current)
        DSL.instance_eval(&block) if block
        Routes::STACK.namespaces.pop
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
shoulda_routing-0.0.2 lib/shoulda_routing/namespaces/base.rb