class Grape::Namespace
May also be referred to as group, segment, or resource.
logical grouping of endpoints as well as sharing common configuration.
A container for endpoints or other namespaces, which allows for both
def self.joined_space(settings)
def self.joined_space(settings) settings&.map(&:space) end
def self.joined_space_path(settings)
-
settings
(Array
) -- list of Grape::Util::InheritableSettings.
def self.joined_space_path(settings) JoinedSpaceCache[joined_space(settings)] end
def initialize(space, options)
(**options)
-
:requirements
(Hash
) -- param-regex pairs, all of which must
Parameters:
-
options
(Hash
) -- options hash -
space
(String
) -- the name of this namespace
def initialize(space, options) @space = space.to_s @options = options end
def requirements
-
(Hash)
-
def requirements options[:requirements] || {} end