class ActionsNlp

Public Class Methods

new() click to toggle source
Calls superclass method
# File lib/macrohub.rb, line 230
def initialize()

  super()

  params = {}
  actions(params)

end

Protected Instance Methods

actions(params) click to toggle source
# File lib/macrohub.rb, line 241
def actions(params) 

  puts 'inside actions'
  # e.g. Say 'Good morning'
  #
  get /say ['"]([^'"]+)/i do |s|
    puts 's: ' + s.inspect if $debug
    [SayAction, {msg: s} ]
  end
  
  # e.g. webhook entered_kitchen
  #
  get /webhook (.*)/i do |name|
    [WebhookAction, {id: name }]
  end      
  
  get /.*/ do
    puts 'action unknown' if $debug
    []
  end

end