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

Methods included from Service::Configs::Standard

service?, service_class?

Methods included from Config

included

Constructor Details

#initialize(params:) ⇒ CastParams

Returns a new instance of CastParams.



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

def initialize(params:)
  @params = params
end

Instance Attribute Details

#paramsObject (readonly)

Returns the value of attribute params.



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

def params
  @params
end

Instance Method Details

#resultObject



22
23
24
# File 'lib/convenient_service/examples/standard/request_params/services/cast_params.rb', line 22

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