Class: Plushie::Animation::State
- Inherits:
-
Data
- Object
- Data
- Plushie::Animation::State
- Includes:
- Model::Extensions
- Defined in:
- lib/plushie/animation.rb
Overview
Immutable animation state.
Instance Attribute Summary collapse
-
#duration ⇒ Object
readonly
Returns the value of attribute duration.
-
#easing ⇒ Object
readonly
Returns the value of attribute easing.
-
#from ⇒ Object
readonly
Returns the value of attribute from.
-
#started_at ⇒ Object
readonly
Returns the value of attribute started_at.
-
#to ⇒ Object
readonly
Returns the value of attribute to.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#with(**changes) ⇒ Object
included
from Model::Extensions
private
Return a new instance with the given fields replaced.
Instance Attribute Details
#duration ⇒ Object (readonly)
Returns the value of attribute duration
42 43 44 |
# File 'lib/plushie/animation.rb', line 42 def duration @duration end |
#easing ⇒ Object (readonly)
Returns the value of attribute easing
42 43 44 |
# File 'lib/plushie/animation.rb', line 42 def easing @easing end |
#from ⇒ Object (readonly)
Returns the value of attribute from
42 43 44 |
# File 'lib/plushie/animation.rb', line 42 def from @from end |
#started_at ⇒ Object (readonly)
Returns the value of attribute started_at
42 43 44 |
# File 'lib/plushie/animation.rb', line 42 def started_at @started_at end |
#to ⇒ Object (readonly)
Returns the value of attribute to
42 43 44 |
# File 'lib/plushie/animation.rb', line 42 def to @to end |
#value ⇒ Object (readonly)
Returns the value of attribute 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)