Method: ApimaticCalculator::BaseController#new_parameter

Defined in:
lib/apimatic_calculator/controllers/base_controller.rb

#new_parameter(value, key: nil) ⇒ Parameter

Creates a new instance of the parameter.

Parameters:

  • key (String|optional) (defaults to: nil)

    The key of the parameter.

  • value (Object)

    The value of the parameter.

Returns:

  • (Parameter)

    The instance of Parameter.



59
60
61
62
63
# File 'lib/apimatic_calculator/controllers/base_controller.rb', line 59

def new_parameter(value, key: nil)
  Parameter.new
           .key(key)
           .value(value)
end