Class: Lita::Actions::Weather

Inherits:
Base
  • Object
show all
Defined in:
lib/lita/actions/weather.rb

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Lita::Actions::Base

Instance Method Details

#actions(source) ⇒ Object



4
5
6
7
8
9
10
11
12
13
# File 'lib/lita/actions/weather.rb', line 4

def actions(source)
  super.merge(send: lambda do |_context, msg|
    @robot.send_message(source, msg['text'])
  end,
    merge: lambda do |r|
      Utils::ContextPiper.pipe(r['context'], r['entities'], 'intent', 'intent')
      Utils::ContextPiper.pipe(r['context'], r['entities'], 'location', 'loc')
      r['context']
    end)
end