Sha256: 65534c0baae5b9b933ee743ea145012fb28b3819496ea62fdf3081498d361523
Contents?: true
Size: 580 Bytes
Versions: 8
Compression:
Stored size: 580 Bytes
Contents
require 'openstax/api/constraints' module OpenStax module Api module RoutingMapperIncludes def api(version, options = {}) constraints = Constraints.new(version: version, default: options.delete(:default)) namespace :api, defaults: {format: 'json'}.merge(options) do scope(module: version, constraints: constraints) { yield } end end end end end ActionDispatch::Routing::Mapper.send :include, OpenStax::Api::RoutingMapperIncludes
Version data entries
8 entries across 8 versions & 1 rubygems