Class: MadFrameJournal

Inherits:
Object
  • Object
show all
Includes:
Madeleine::Automatic::Interceptor
Defined in:
lib/frame_journal.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeMadFrameJournal

Returns a new instance of MadFrameJournal.



25
26
27
28
29
# File 'lib/frame_journal.rb', line 25

def initialize
  @frames = {}
  @frame_index = 0
  @system_id = nil
end

Instance Attribute Details

#frame_indexObject

Returns the value of attribute frame_index.



20
21
22
# File 'lib/frame_journal.rb', line 20

def frame_index
  @frame_index
end

#framesObject (readonly)

Returns the value of attribute frames.



18
19
20
# File 'lib/frame_journal.rb', line 18

def frames
  @frames
end

#system_idObject

Returns the value of attribute system_id.



22
23
24
# File 'lib/frame_journal.rb', line 22

def system_id
  @system_id
end

Instance Method Details

#add(msgid, frame) ⇒ Object



31
32
33
# File 'lib/frame_journal.rb', line 31

def add(msgid, frame)
  @frames[msgid] = frame
end

#clearObject



39
40
41
# File 'lib/frame_journal.rb', line 39

def clear
  @frames.clear
end

#delete(msgid) ⇒ Object



35
36
37
# File 'lib/frame_journal.rb', line 35

def delete(msgid)
  @frames.delete(msgid)
end

#lookup(msgid) ⇒ Object



44
45
46
# File 'lib/frame_journal.rb', line 44

def lookup(msgid)
  @frames[msgid]
end