lib/lita/services/wit_client.rb in lita-wit-0.1.2 vs lib/lita/services/wit_client.rb in lita-wit-0.1.3

- old
+ new

@@ -1,19 +1,18 @@ module Lita module Services class WitClient - def initialize(robot) @robot = robot @token = robot.config.handlers.wit.server_access_token @actions_class = robot.config.handlers.wit.actions_class end - def run_actions(session_id, message, context={}, max_steps=DEFAULT_MAX_STEPS) + def run_actions(session_id, message, context = {}, max_steps = DEFAULT_MAX_STEPS) actions = @actions_class.new(@robot).actions(message.source) - @wit = ::Wit.new(@token, actions) + @wit = ::Wit.new(access_token: @token, actions: actions) stripped = Utils::AliasStripper.strip(@robot, message) @wit.run_actions(session_id, stripped.body, context, max_steps) end end end -end \ No newline at end of file +end