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)

(see ::joined_space_path)
def self.joined_space(settings)
  settings&.map(&:space)
end

def self.joined_space_path(settings)

Parameters:
  • settings (Array) -- list of Grape::Util::InheritableSettings.
def self.joined_space_path(settings)
  JoinedSpaceCache[joined_space(settings)]
end

def initialize(space, options)

Options Hash: (**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

Returns:
  • (Hash) -
def requirements
  options[:requirements] || {}
end