Module: Plushie::Model::Extensions Private

Included in:
Animation::Tween::State, Route::State, Selection::State, State::Container, Undo::Entry, Undo::State
Defined in:
lib/plushie/model.rb,
sig/plushie/model.rbs

Overview

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Methods mixed into Model classes.

Instance Method Summary collapse

Instance Method Details

#with(**changes) ⇒ self

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Return a new instance with the given fields replaced.

Parameters:

  • changes (Object)

Returns:

  • (self)


29
30
31
# File 'lib/plushie/model.rb', line 29

def with(**changes)
  self.class.new(**to_h.merge(changes))
end