J
J2M
I would like to be able to be able to include instance methods of a
Struct into a class. e.g.
foo = Struct.newattribute, :another_attribute)
bar = foo.new
class Bas
some_ruby_magic
end
So that I can then do
Bas.attribute="a value"
Bas.attribute
Kind of like doing module_functions but that doesn't work inside a
class.
Thanks,
James
Struct into a class. e.g.
foo = Struct.newattribute, :another_attribute)
bar = foo.new
class Bas
some_ruby_magic
end
So that I can then do
Bas.attribute="a value"
Bas.attribute
Kind of like doing module_functions but that doesn't work inside a
class.
Thanks,
James