Class: IndexElement

Inherits:
Object
  • Object
show all
Defined in:
lib/rfile.rb

Overview

length, offset and line number for an indexed chunk of file

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#lengthObject

Returns the value of attribute length.



125
126
127
# File 'lib/rfile.rb', line 125

def length
  @length
end

#linumObject

Returns the value of attribute linum.



125
126
127
# File 'lib/rfile.rb', line 125

def linum
  @linum
end

#offsetObject

Returns the value of attribute offset.



125
126
127
# File 'lib/rfile.rb', line 125

def offset
  @offset
end