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.
16 17 18 19 20 21 |
# File 'lib/innodb/cursor.rb', line 16 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.
11 12 13 |
# File 'lib/innodb/cursor.rb', line 11 def cursor @cursor end |
#direction ⇒ Object
Returns the value of attribute direction.
13 14 15 |
# File 'lib/innodb/cursor.rb', line 13 def direction @direction end |
#name ⇒ Object
Returns the value of attribute name.
14 15 16 |
# File 'lib/innodb/cursor.rb', line 14 def name @name end |
#position ⇒ Object
Returns the value of attribute position.
12 13 14 |
# File 'lib/innodb/cursor.rb', line 12 def position @position end |
Instance Method Details
#dup ⇒ Object
23 24 25 |
# File 'lib/innodb/cursor.rb', line 23 def dup StackEntry.new(cursor, position, direction, name.dup) end |