Class: Talktome::Strategy::Debug
- Inherits:
-
Object
- Object
- Talktome::Strategy::Debug
- Defined in:
- lib/talktome/strategy/debug.rb
Instance Attribute Summary collapse
-
#last ⇒ Object
Returns the value of attribute last.
Instance Method Summary collapse
Instance Attribute Details
#last ⇒ Object
Returns the value of attribute last.
5 6 7 |
# File 'lib/talktome/strategy/debug.rb', line 5 def last @last end |
Instance Method Details
#clear! ⇒ Object
7 8 9 |
# File 'lib/talktome/strategy/debug.rb', line 7 def clear! @last = nil end |
#send_message(message, user) {|@last| ... } ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'lib/talktome/strategy/debug.rb', line 11 def (, user) require 'ostruct' @last = OpenStruct.new({ message: , user: user }) yield(@last) if block_given? @last end |