Class: Plushie::Animation::State

Inherits:
Data
  • Object
show all
Includes:
Model::Extensions
Defined in:
lib/plushie/animation.rb

Overview

Immutable animation state.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#durationObject (readonly)

Returns the value of attribute duration

Returns:

  • (Object)

    the current value of duration



42
43
44
# File 'lib/plushie/animation.rb', line 42

def duration
  @duration
end

#easingObject (readonly)

Returns the value of attribute easing

Returns:

  • (Object)

    the current value of easing



42
43
44
# File 'lib/plushie/animation.rb', line 42

def easing
  @easing
end

#fromObject (readonly)

Returns the value of attribute from

Returns:

  • (Object)

    the current value of from



42
43
44
# File 'lib/plushie/animation.rb', line 42

def from
  @from
end

#started_atObject (readonly)

Returns the value of attribute started_at

Returns:

  • (Object)

    the current value of started_at



42
43
44
# File 'lib/plushie/animation.rb', line 42

def started_at
  @started_at
end

#toObject (readonly)

Returns the value of attribute to

Returns:

  • (Object)

    the current value of to



42
43
44
# File 'lib/plushie/animation.rb', line 42

def to
  @to
end

#valueObject (readonly)

Returns the value of attribute value

Returns:

  • (Object)

    the current value of value



42
43
44
# File 'lib/plushie/animation.rb', line 42

def value
  @value
end

Instance Method Details

#with(**changes) ⇒ Object Originally defined in module Model::Extensions

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. Unspecified fields carry over from the current instance.

model.with(count: model.count + 1)