class TriggersNlp

Attributes

to_type[R]

Public Class Methods

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

  super()

  params = {}
  puts 'inside Trigger'
  puts 'params: ' + params.inspect
  triggers(params)

end

Protected Instance Methods

triggers(params) click to toggle source
# File lib/macrohub.rb, line 208
def triggers(params) 
  
  puts 'inside triggers'

  # e.g. Motion detected in the kitchen
  #
  get /motion detected in the (.*)/i do |location|
    puts 'motion detection trigger' if $debug
    [MotionTrigger, {location: location}]
  end

end