3 ms·
All classes in Ruby are dynamic. There is no effectively no difference between these: class Foo < Bar attr_accessor :baz end Foo = Class.ne
by stouset 2y ago
All classes in Ruby are dynamic.
There is no effectively no difference between these:
class Foo < Bar
attr_accessor :baz
end
Foo = Class.new(Bar) do
define_method(:baz) do
@baz
end
end