Class: ConvenientService::Examples::Standard::RequestParams::Services::CastParams

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params:) ⇒ CastParams

Returns a new instance of CastParams.



13
14
15
# File 'lib/convenient_service/examples/standard/request_params/services/cast_params.rb', line 13

def initialize(params:)
  @params = params
end

Instance Attribute Details

#paramsObject (readonly)

Returns the value of attribute params.



11
12
13
# File 'lib/convenient_service/examples/standard/request_params/services/cast_params.rb', line 11

def params
  @params
end

Instance Method Details

#resultObject



17
18
19
# File 'lib/convenient_service/examples/standard/request_params/services/cast_params.rb', line 17

def result
  success(original_params: params, casted_params: casted_params)
end