module Motion::Component::Motions::ModuleFunctions

Analogous to `module_function` (available on both class and instance)

Public Instance Methods

map_motion(motion, handler = motion) click to toggle source
# File lib/motion/component/motions.rb, line 18
def map_motion(motion, handler = motion)
  self._motion_handlers =
    _motion_handlers.merge(motion.to_s => handler.to_sym).freeze
end
motions() click to toggle source
# File lib/motion/component/motions.rb, line 28
def motions
  _motion_handlers.keys
end
unmap_motion(motion) click to toggle source
# File lib/motion/component/motions.rb, line 23
def unmap_motion(motion)
  self._motion_handlers =
    _motion_handlers.except(motion.to_s).freeze
end