class R2OAS::Schema::V3::PathItemObject::HttpStatusManager

Public Class Methods

new(path, verb, http_statuses_when_http_method) click to toggle source
# File lib/r2-oas/schema/v3/object/from_routes/path_item_object.rb, line 161
def initialize(path, verb, http_statuses_when_http_method)
  @path_comp                      = Routing::PathComponent.new(path)
  @verb                           = verb
  @http_statuses_when_http_method = http_statuses_when_http_method
end

Public Instance Methods

http_statuses() click to toggle source
# File lib/r2-oas/schema/v3/object/from_routes/path_item_object.rb, line 167
def http_statuses
  key = @path_comp.exist_path_parameters? ? :path_parameter : :default
  @http_statuses_when_http_method[@verb.to_sym][key]
end