def self.append_features(klass)
super
arity = klass.instance_method(:initialize).arity
raise 'the initialize method of a class including PropsInit must have a fixed arity' if arity < 0
args_list = (1..arity).collect { |i| "param#{i}" }.join(", ")
klass.module_eval "alias :_initialize :initialize\ndef initialize(\#{args_list}, *args)\n_initialize(\#{args_list})\ninit_props(*args)\nend\n\nalias :_set_property :set_property\ndef set_property(prop_name, value)\npspec = self.class.property(prop_name)\nvalue = value.to_goo if pspec.value_type.name =~ /^GooCairo/ and value.respond_to?(:to_goo)\n_set_property(prop_name, value)\nend\n"
end