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.
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_index ⇒ Object
Returns the value of attribute frame_index.
20 21 22 |
# File 'lib/frame_journal.rb', line 20 def frame_index @frame_index end |
#frames ⇒ Object (readonly)
Returns the value of attribute frames.
18 19 20 |
# File 'lib/frame_journal.rb', line 18 def frames @frames end |
#system_id ⇒ Object
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 |
#clear ⇒ Object
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 |