Class: Plushie::Undo::State
- Inherits:
-
Data
- Object
- Data
- Plushie::Undo::State
- Includes:
- Model::Extensions
- Defined in:
- lib/plushie/undo.rb,
sig/plushie/undo.rbs
Overview
Immutable undo state.
Instance Attribute Summary collapse
-
#current ⇒ Object
readonly
Returns the value of attribute current.
-
#max_size ⇒ Object
readonly
Returns the value of attribute max_size.
-
#redo_stack ⇒ Object
readonly
Returns the value of attribute redo_stack.
-
#undo_size ⇒ Object
readonly
Returns the value of attribute undo_size.
-
#undo_stack ⇒ Object
readonly
Returns the value of attribute undo_stack.
Instance Method Summary collapse
-
#initialize ⇒ State
constructor
A new instance of State.
- #with ⇒ State
Constructor Details
#initialize ⇒ State
Returns a new instance of State.
12 |
# File 'sig/plushie/undo.rbs', line 12
def initialize: (current: untyped, max_size: Integer, undo_size: Integer, undo_stack: Array[Entry], redo_stack: Array[Entry]) -> void
|
Instance Attribute Details
#current ⇒ Object (readonly)
Returns the value of attribute current
37 38 39 |
# File 'lib/plushie/undo.rb', line 37 def current @current end |
#max_size ⇒ Object (readonly)
Returns the value of attribute max_size
37 38 39 |
# File 'lib/plushie/undo.rb', line 37 def max_size @max_size end |
#redo_stack ⇒ Object (readonly)
Returns the value of attribute redo_stack
37 38 39 |
# File 'lib/plushie/undo.rb', line 37 def redo_stack @redo_stack end |
#undo_size ⇒ Object (readonly)
Returns the value of attribute undo_size
37 38 39 |
# File 'lib/plushie/undo.rb', line 37 def undo_size @undo_size end |
#undo_stack ⇒ Object (readonly)
Returns the value of attribute undo_stack
37 38 39 |
# File 'lib/plushie/undo.rb', line 37 def undo_stack @undo_stack end |