Class: ConvenientService::Examples::Standard::RequestParams::Utils::Integer::SafeParse

Inherits:
Command
  • Object
show all
Defined in:
lib/convenient_service/examples/standard/request_params/utils/integer/safe_parse.rb

Overview

TODO: Specs.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(object) ⇒ SafeParse

Returns a new instance of SafeParse.



18
19
20
# File 'lib/convenient_service/examples/standard/request_params/utils/integer/safe_parse.rb', line 18

def initialize(object)
  @object = object
end

Instance Attribute Details

#objectObject (readonly)

Returns the value of attribute object.



16
17
18
# File 'lib/convenient_service/examples/standard/request_params/utils/integer/safe_parse.rb', line 16

def object
  @object
end

Instance Method Details

#callObject



22
23
24
# File 'lib/convenient_service/examples/standard/request_params/utils/integer/safe_parse.rb', line 22

def call
  ::Kernel.Integer(object, exception: false)
end