Sha256: 2cd88dcf4c7a0bf529368e03c0b75353114d3e1224677d554f23b3f6e602ca62

Contents?: true

Size: 311 Bytes

Versions: 1

Compression:

Stored size: 311 Bytes

Contents

module Jets::Router::Dsl
  module Mount
    # The mounted class must be a Rack compatiable class
    def mount(klass, at:)
      options = {to: "jets/mount#call", mount_class: klass}
      at_wildcard = at.blank? ? "*path" : "#{at}/*path"

      any at, options
      any at_wildcard, options
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
jets-2.3.0 lib/jets/router/dsl/mount.rb