Class: FuncBot::Functions::Handler
- Inherits:
-
Object
- Object
- FuncBot::Functions::Handler
- Defined in:
- lib/func_bot/functions/handler.rb
Instance Attribute Summary collapse
-
#bot ⇒ Object
Returns the value of attribute bot.
-
#prompt ⇒ Object
Returns the value of attribute prompt.
Instance Method Summary collapse
- #handle ⇒ Object
-
#initialize(bot) ⇒ Handler
constructor
A new instance of Handler.
Constructor Details
#initialize(bot) ⇒ Handler
Returns a new instance of Handler.
8 9 10 |
# File 'lib/func_bot/functions/handler.rb', line 8 def initialize(bot) @bot = bot end |
Instance Attribute Details
#bot ⇒ Object
Returns the value of attribute bot.
6 7 8 |
# File 'lib/func_bot/functions/handler.rb', line 6 def bot @bot end |
#prompt ⇒ Object
Returns the value of attribute prompt.
6 7 8 |
# File 'lib/func_bot/functions/handler.rb', line 6 def prompt @prompt end |
Instance Method Details
#handle ⇒ Object
12 13 14 15 |
# File 'lib/func_bot/functions/handler.rb', line 12 def handle bot.history.chronicle("function", function_data, function_name) bot.client.call end |