Class: Sinbotra::Bot::DefaultMessageHistory
- Inherits:
-
Object
- Object
- Sinbotra::Bot::DefaultMessageHistory
- Defined in:
- lib/sinbotra/bot/default_message_history.rb
Instance Attribute Summary collapse
-
#store ⇒ Object
readonly
Returns the value of attribute store.
Instance Method Summary collapse
- #add_message(msg) ⇒ Object
- #all ⇒ Object
-
#initialize(store = []) ⇒ DefaultMessageHistory
constructor
A new instance of DefaultMessageHistory.
Constructor Details
#initialize(store = []) ⇒ DefaultMessageHistory
Returns a new instance of DefaultMessageHistory.
5 6 7 |
# File 'lib/sinbotra/bot/default_message_history.rb', line 5 def initialize(store=[]) @store = store end |
Instance Attribute Details
#store ⇒ Object (readonly)
Returns the value of attribute store.
3 4 5 |
# File 'lib/sinbotra/bot/default_message_history.rb', line 3 def store @store end |
Instance Method Details
#add_message(msg) ⇒ Object
9 10 11 |
# File 'lib/sinbotra/bot/default_message_history.rb', line 9 def (msg) @store << msg end |
#all ⇒ Object
13 |
# File 'lib/sinbotra/bot/default_message_history.rb', line 13 def all() @store end |