Un ejemplo
class Example
attr_accessor_with_default :attr, 'default message'
end
e = Example.new
e.attr
=> 'default message'
Blog de programación y diseño de software
class Example
attr_accessor_with_default :attr, 'default message'
end
e = Example.new
e.attr
=> 'default message'