Class: Innodb::Cursor::StackEntry
- Inherits:
-
Object
- Object
- Innodb::Cursor::StackEntry
- Defined in:
- lib/innodb/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.
Constructor Details
#initialize(cursor, position = 0, direction = :forward, name = nil) ⇒ StackEntry
Returns a new instance of StackEntry.
17 18 19 20 21 22 |
# File 'lib/innodb/cursor.rb', line 17 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.
12 13 14 |
# File 'lib/innodb/cursor.rb', line 12 def cursor @cursor end |
#direction ⇒ Object
Returns the value of attribute direction.
14 15 16 |
# File 'lib/innodb/cursor.rb', line 14 def direction @direction end |
#name ⇒ Object
Returns the value of attribute name.
15 16 17 |
# File 'lib/innodb/cursor.rb', line 15 def name @name end |
#position ⇒ Object
Returns the value of attribute position.
13 14 15 |
# File 'lib/innodb/cursor.rb', line 13 def position @position end |
Instance Method Details
#dup ⇒ Object
24 25 26 |
# File 'lib/innodb/cursor.rb', line 24 def dup StackEntry.new(cursor, position, direction, name.dup) end |