rubyx/test/melon/fragments/helper.rb
2017-01-17 21:26:28 +02:00

18 lines
456 B
Ruby

require_relative '../helper'
require "register/interpreter"
require "parser/ruby22"
module Melon
module MelonTests
include CompilerHelper
include Register::InterpreterHelpers
subs = ObjectSpace.each_object(Class).select { |klass| klass < Register::Instruction }
subs.each do |clazz|
name = clazz.to_s
next if name.include?("Arm")
scoped = name.split("::").last
module_eval "#{scoped} = #{name}"
end
end
end