class AlexaSkillResponseCollection
Public Class Methods
new(skills={}, debug: false, rsc: nil, whitelist: {users: nil, devices: nil})
click to toggle source
# File lib/alexa_skillresponse.rb, line 152 def initialize(skills={}, debug: false, rsc: nil, whitelist: {users: nil, devices: nil}) @debug = debug @skills = skills.inject({}) do |r, x| package_name, rsf_package = x asr = AlexaSkillResponse.new(rsf_package, debug: debug, rsc: rsc, whitelist: whitelist) r.merge(package_name => asr) end end
Public Instance Methods
run(skill, h)
click to toggle source
# File lib/alexa_skillresponse.rb, line 167 def run(skill, h) puts 'skill: ' + skill.inspect if @debug puts '@skills: ' + @skills.inspect if @debug @skills[skill].run h end