Module: Cuprum::Collections::Adaptable::Commands::AbstractAssignOne

Includes:
ParameterValidation
Defined in:
lib/cuprum/collections/adaptable/commands/abstract_assign_one.rb

Overview

Abstract implementation of the AssignOne command for adaptable collections.

Instance Method Summary collapse

Instance Method Details

#call(attributes:, entity:) ⇒ Object

Merges the given attributes into the given entity.

Parameters:

  • attributes (Hash)

    the attributes to merge into the entity.

  • entity (Object)

    the entity to update.

Returns:

  • (Object)

    an instance of the entity class with the updated attributes.



20
# File 'lib/cuprum/collections/adaptable/commands/abstract_assign_one.rb', line 20

validate :attributes