Sha256: 5c5730bc622e0dbb857b3022c18a4440ae040cb1a3de6a004787b9886d71e36b
Contents?: true
Size: 947 Bytes
Versions: 1
Compression:
Stored size: 947 Bytes
Contents
module SurfaceMaster module Orbit class Interaction < SurfaceMaster::Interaction def initialize(opts = nil) @device_class = Device super(opts) end private def respond_to_action(action) # type = action[:type].to_sym # state = action[:state].to_sym # actions = [] # if type == :grid # actions += responses[:"grid#{action[:x]}#{action[:y]}"][state] # actions += responses[:"grid#{action[:x]}-"][state] # actions += responses[:"grid-#{action[:y]}"][state] # end # actions += responses[type][state] # actions += responses[:all][state] # actions.compact.each {|block| block.call(self, action)} rescue Exception => e # TODO: StandardException, RuntimeError, or Exception? logger.error "Error when responding to action #{action.inspect}: #{e.inspect}" raise e end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
surface_master-0.2.0 | lib/surface_master/orbit/interaction.rb |