Class: MadFrameJournal
- Inherits:
-
Object
- Object
- MadFrameJournal
- Includes:
- Madeleine::Automatic::Interceptor
- Defined in:
- lib/frame_journal.rb
Instance Attribute Summary collapse
-
#frame_index ⇒ Object
Returns the value of attribute frame_index.
-
#frames ⇒ Object
readonly
Returns the value of attribute frames.
-
#system_id ⇒ Object
Returns the value of attribute system_id.
Instance Method Summary collapse
- #add(msgid, frame) ⇒ Object
- #clear ⇒ Object
- #delete(msgid) ⇒ Object
-
#initialize ⇒ MadFrameJournal
constructor
A new instance of MadFrameJournal.
- #lookup(msgid) ⇒ Object
Constructor Details
#initialize ⇒ MadFrameJournal
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_index ⇒ Object
Returns the value of attribute frame_index.
21 22 23 |
# File 'lib/frame_journal.rb', line 21 def frame_index @frame_index end |
#frames ⇒ Object (readonly)
Returns the value of attribute frames.
19 20 21 |
# File 'lib/frame_journal.rb', line 19 def frames @frames end |
#system_id ⇒ Object
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 |
#clear ⇒ Object
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 |