require 'java' class A < java.lang.Object def A.dsl_method(*args) puts args.join(', ') end end class B < A dsl_method :a, :b end b = B.new