Method: WscSdk::Schema#transform_value

Defined in:
lib/wsc_sdk/schema.rb

#transform_value(attribute, model, value) ⇒ Any

Transforms a value into the appropriate type.

Parameters:

  • attribute (Symbol)

    The attribute to validate the value for.

  • model (WscSdk::Model)

    The model to transform the value for.

  • value (Any)

    The value to validate

Returns:

  • (Any)

    The transformed value.



109
110
111
112
# File 'lib/wsc_sdk/schema.rb', line 109

def transform_value(attribute, model, value)
  return nil unless has_attribute?(attribute)
  self[attribute].transform_value(model, value)
end