Sha256: aff7d0392ac086c592cd9aeb57eeff27d0441b6bd05e63655aa37b1f9874866e

Contents?: true

Size: 608 Bytes

Versions: 1

Compression:

Stored size: 608 Bytes

Contents

module Eastwood
  module Config
    extend ActiveSupport::Concern

    included do
      reset!
    end

    module ClassMethods

      def hash( name, route )
        hashes[ name ] = route
      end

      def hashes
        @@hashes ||= Hash.new
      end

      def export( *args )
        exports.merge! *args
      end

      def exports
        @@exports ||= Hash.new
      end

      mattr_accessor :default_route_format
      mattr_accessor :javascript_route_style

      def reset!
        @@default_route_format   = :json
        @@javascript_route_style = :underscore
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
eastwood-0.3.7 lib/eastwood/config.rb