Class: ConvenientService::Examples::Standard::V1::RequestParams::Services::MergeParams

Inherits:
Object
  • Object
show all
Includes:
Service::Configs::Standard::V1
Defined in:
lib/convenient_service/examples/standard/v1/request_params/services/merge_params.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params_from_path:, params_from_body:) ⇒ MergeParams

Returns a new instance of MergeParams.



14
15
16
17
# File 'lib/convenient_service/examples/standard/v1/request_params/services/merge_params.rb', line 14

def initialize(params_from_path:, params_from_body:)
  @params_from_path = params_from_path
  @params_from_body = params_from_body
end

Instance Attribute Details

#params_from_bodyObject (readonly)

Returns the value of attribute params_from_body.



12
13
14
# File 'lib/convenient_service/examples/standard/v1/request_params/services/merge_params.rb', line 12

def params_from_body
  @params_from_body
end

#params_from_pathObject (readonly)

Returns the value of attribute params_from_path.



12
13
14
# File 'lib/convenient_service/examples/standard/v1/request_params/services/merge_params.rb', line 12

def params_from_path
  @params_from_path
end

Instance Method Details

#resultObject



19
20
21
# File 'lib/convenient_service/examples/standard/v1/request_params/services/merge_params.rb', line 19

def result
  success(params: params_from_path.merge(params_from_body))
end