Class: LS4::FileUpdateLog::RecordRef

Inherits:
Object
  • Object
show all
Defined in:
lib/ls4/service/ulog_file.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(reltime, pos) ⇒ RecordRef

Returns a new instance of RecordRef.



111
112
113
114
# File 'lib/ls4/service/ulog_file.rb', line 111

def initialize(reltime, pos)
  @reltime = reltime
  @pos = pos
end

Instance Attribute Details

#posObject (readonly)

Returns the value of attribute pos.



117
118
119
# File 'lib/ls4/service/ulog_file.rb', line 117

def pos
  @pos
end

#reltimeObject (readonly)

Returns the value of attribute reltime.



116
117
118
# File 'lib/ls4/service/ulog_file.rb', line 116

def reltime
  @reltime
end

Class Method Details

.read(stream) ⇒ Object



128
129
130
131
132
# File 'lib/ls4/service/ulog_file.rb', line 128

def self.read(stream)
  pos = stream.pos
  reltime = Record.read_nodata(stream)
  new(reltime, pos)
end

Instance Method Details

#<=>(o) ⇒ Object



119
120
121
# File 'lib/ls4/service/ulog_file.rb', line 119

def <=>(o)
  @reltime <=> o.reltime
end

#read_body(stream) ⇒ Object



123
124
125
126
# File 'lib/ls4/service/ulog_file.rb', line 123

def read_body(stream)
  stream.pos = @pos
  Record.read(stream)
end