Class: FuncBot::Functions::Handler

Inherits:
Object
  • Object
show all
Defined in:
lib/func_bot/functions/handler.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#botObject

Returns the value of attribute bot.



6
7
8
# File 'lib/func_bot/functions/handler.rb', line 6

def bot
  @bot
end

#promptObject

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

#handleObject



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