Class: OpenWFE::JournalReplay::ExpoolState

Inherits:
Object
  • Object
show all
Includes:
FeiMixin
Defined in:
lib/openwfe/expool/journal_replay.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(offset, date, static, dynamic, participants) ⇒ ExpoolState

Returns a new instance of ExpoolState.



279
280
281
282
283
284
285
286
# File 'lib/openwfe/expool/journal_replay.rb', line 279

def initialize (offset, date, static, dynamic, participants)

    @offset = offset
    @date = date
    @static = static
    @dynamic = dynamic
    @participants = participants
end

Instance Attribute Details

#dateObject

Returns the value of attribute date.



272
273
274
# File 'lib/openwfe/expool/journal_replay.rb', line 272

def date
  @date
end

#dynamicObject

Returns the value of attribute dynamic.



272
273
274
# File 'lib/openwfe/expool/journal_replay.rb', line 272

def dynamic
  @dynamic
end

#offsetObject

Returns the value of attribute offset.



272
273
274
# File 'lib/openwfe/expool/journal_replay.rb', line 272

def offset
  @offset
end

#participantsObject

Returns the value of attribute participants.



272
273
274
# File 'lib/openwfe/expool/journal_replay.rb', line 272

def participants
  @participants
end

#staticObject

Returns the value of attribute static.



272
273
274
# File 'lib/openwfe/expool/journal_replay.rb', line 272

def static
  @static
end

Instance Method Details

#to_sObject



288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
# File 'lib/openwfe/expool/journal_replay.rb', line 288

def to_s

    s = " ===== offset : #{@offset}  #{@date} =====\n"

    s << "\n"
    s << "static :\n"
    @static.each do |e|
        s << " - #{e[0]}   #{extract_fei(e[2]).to_short_s}\n"
    end

    s << "\n"
    s << "dynamic :\n"
    @dynamic.each do |e|
        s << " - #{e[0]}   #{extract_fei(e[2]).to_short_s}\n"
    end

    #s << "\n"
    #s <<  "participants :\n"
    #@participants.each do |fei, v|
    #    s << " - #{fei.to_short_s}\n"
    #end

    s
end