Class: Gitlab::GrapeOpenapi::Models::RequestBody::Parameters
- Inherits:
-
Object
- Object
- Gitlab::GrapeOpenapi::Models::RequestBody::Parameters
- Defined in:
- lib/gitlab/grape_openapi/models/request_body/parameters.rb
Instance Attribute Summary collapse
-
#params ⇒ Object
readonly
Returns the value of attribute params.
-
#route ⇒ Object
readonly
Returns the value of attribute route.
Instance Method Summary collapse
- #extract ⇒ Object
-
#initialize(route:, params:) ⇒ Parameters
constructor
A new instance of Parameters.
Constructor Details
#initialize(route:, params:) ⇒ Parameters
Returns a new instance of Parameters.
10 11 12 13 |
# File 'lib/gitlab/grape_openapi/models/request_body/parameters.rb', line 10 def initialize(route:, params:) @route = route @params = params end |
Instance Attribute Details
#params ⇒ Object (readonly)
Returns the value of attribute params.
8 9 10 |
# File 'lib/gitlab/grape_openapi/models/request_body/parameters.rb', line 8 def params @params end |
#route ⇒ Object (readonly)
Returns the value of attribute route.
8 9 10 |
# File 'lib/gitlab/grape_openapi/models/request_body/parameters.rb', line 8 def route @route end |
Instance Method Details
#extract ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/gitlab/grape_openapi/models/request_body/parameters.rb', line 15 def extract body_params = params.reject do |key, _| path_with_params.include?("{#{key}}") end restructure_nested_params(body_params) end |