Class: IndexElement
- Inherits:
-
Object
- Object
- IndexElement
- Defined in:
- lib/rfile.rb
Overview
length, offset and line number for an indexed chunk of file
Instance Attribute Summary collapse
-
#length ⇒ Object
Returns the value of attribute length.
-
#linum ⇒ Object
Returns the value of attribute linum.
-
#offset ⇒ Object
Returns the value of attribute offset.
Instance Method Summary collapse
-
#initialize(index_data = []) ⇒ IndexElement
constructor
A new instance of IndexElement.
Constructor Details
#initialize(index_data = []) ⇒ IndexElement
Returns a new instance of IndexElement.
130 131 132 |
# File 'lib/rfile.rb', line 130 def initialize(index_data=[]) (@length,@offset,@linum) = index_data end |
Instance Attribute Details
#length ⇒ Object
Returns the value of attribute length.
125 126 127 |
# File 'lib/rfile.rb', line 125 def length @length end |
#linum ⇒ Object
Returns the value of attribute linum.
125 126 127 |
# File 'lib/rfile.rb', line 125 def linum @linum end |
#offset ⇒ Object
Returns the value of attribute offset.
125 126 127 |
# File 'lib/rfile.rb', line 125 def offset @offset end |