Class: BufferCursor::StackEntry
- Inherits:
-
Object
- Object
- BufferCursor::StackEntry
- Defined in:
- lib/innodb/util/buffer_cursor.rb
Overview
An entry in a stack of cursors. The cursor position, direction, and name array are each attributes of the current cursor stack and are manipulated together.
Instance Attribute Summary collapse
-
#cursor ⇒ Object
Returns the value of attribute cursor.
-
#direction ⇒ Object
Returns the value of attribute direction.
-
#name ⇒ Object
Returns the value of attribute name.
-
#position ⇒ Object
Returns the value of attribute position.
Instance Method Summary collapse
- #dup ⇒ Object
-
#initialize(cursor, position = 0, direction = :forward, name = nil) ⇒ StackEntry
constructor
A new instance of StackEntry.
- #inspect ⇒ Object
Constructor Details
#initialize(cursor, position = 0, direction = :forward, name = nil) ⇒ StackEntry
Returns a new instance of StackEntry.
20 21 22 23 24 25 |
# File 'lib/innodb/util/buffer_cursor.rb', line 20 def initialize(cursor, position = 0, direction = :forward, name = nil) @cursor = cursor @position = position @direction = direction @name = name || [] end |
Instance Attribute Details
#cursor ⇒ Object
Returns the value of attribute cursor.
15 16 17 |
# File 'lib/innodb/util/buffer_cursor.rb', line 15 def cursor @cursor end |
#direction ⇒ Object
Returns the value of attribute direction.
17 18 19 |
# File 'lib/innodb/util/buffer_cursor.rb', line 17 def direction @direction end |
#name ⇒ Object
Returns the value of attribute name.
18 19 20 |
# File 'lib/innodb/util/buffer_cursor.rb', line 18 def name @name end |
#position ⇒ Object
Returns the value of attribute position.
16 17 18 |
# File 'lib/innodb/util/buffer_cursor.rb', line 16 def position @position end |
Instance Method Details
#dup ⇒ Object
35 36 37 |
# File 'lib/innodb/util/buffer_cursor.rb', line 35 def dup StackEntry.new(cursor, position, direction, name.dup) end |
#inspect ⇒ Object
27 28 29 30 31 32 33 |
# File 'lib/innodb/util/buffer_cursor.rb', line 27 def inspect "<%s direction=%s position=%s>" % [ self.class.name, @direction.inspect, @position, ] end |