Class: ConvenientService::Examples::Standard::V1::RequestParams::Services::ApplyDefaultParamValues
- Inherits:
-
Object
- Object
- ConvenientService::Examples::Standard::V1::RequestParams::Services::ApplyDefaultParamValues
- Includes:
- Service::Configs::Standard::V1
- Defined in:
- lib/convenient_service/examples/standard/v1/request_params/services/apply_default_param_values.rb
Instance Attribute Summary collapse
-
#defaults ⇒ Object
readonly
Returns the value of attribute defaults.
-
#params ⇒ Object
readonly
Returns the value of attribute params.
Instance Method Summary collapse
-
#initialize(params:, defaults:) ⇒ ApplyDefaultParamValues
constructor
A new instance of ApplyDefaultParamValues.
- #result ⇒ Object
Constructor Details
#initialize(params:, defaults:) ⇒ ApplyDefaultParamValues
Returns a new instance of ApplyDefaultParamValues.
14 15 16 17 |
# File 'lib/convenient_service/examples/standard/v1/request_params/services/apply_default_param_values.rb', line 14 def initialize(params:, defaults:) @params = params @defaults = defaults end |
Instance Attribute Details
#defaults ⇒ Object (readonly)
Returns the value of attribute defaults.
12 13 14 |
# File 'lib/convenient_service/examples/standard/v1/request_params/services/apply_default_param_values.rb', line 12 def defaults @defaults end |
#params ⇒ Object (readonly)
Returns the value of attribute params.
12 13 14 |
# File 'lib/convenient_service/examples/standard/v1/request_params/services/apply_default_param_values.rb', line 12 def params @params end |
Instance Method Details
#result ⇒ Object
19 20 21 |
# File 'lib/convenient_service/examples/standard/v1/request_params/services/apply_default_param_values.rb', line 19 def result success(params: defaults.merge(params)) end |