Sha256: e658761504cacbc138d28a4f70767db739f28bb67854c7e0ab3275e199585fc9
Contents?: true
Size: 559 Bytes
Versions: 13
Compression:
Stored size: 559 Bytes
Contents
module Savage module DirectionProxy def self.included(klass) klass.extend ClassMethods end module ClassMethods def define_proxies(&block) Directions.constants.each do |constant_sym| constant = (constant_sym.is_a?(Symbol)) ? constant_sym.to_s : constant_sym unless %w[PointTarget CoordinateTarget Point MoveTo].include? constant sym = constant.to_s.gsub(/[A-Z]/) { |p| '_' + p.downcase }[1..-1].to_sym block.call(sym,constant) end end end end end end
Version data entries
13 entries across 13 versions & 3 rubygems