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.



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

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

Instance Attribute Details

#frame_indexObject

Returns the value of attribute frame_index.



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

def frame_index
  @frame_index
end

#framesObject (readonly)

Returns the value of attribute frames.



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

def frames
  @frames
end

#system_idObject

Returns the value of attribute system_id.



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

def system_id
  @system_id
end

Instance Method Details

#add(msgid, frame) ⇒ Object



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

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

#clearObject



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

def clear
  @frames.clear
end

#delete(msgid) ⇒ Object



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

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

#lookup(msgid) ⇒ Object



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

def lookup(msgid)
  @frames[msgid]
end