require 'attributes' class A attribute 'a' end class B < A attribute 'b' end p A.attributes p A.new.attributes p B.attributes p B.new.attributes