tainbox
tainbox copied to clipboard
Incorrect 'default' option behavior for getter
For example:
class Person
include Tainbox
attribute :name, default: 'Vasya', writer: false
end
Person.new.name # => nil
It is expected to be 'Vasya'.
How writer: false
is supposed to work anyways? I can't see any use case for the current behaviour. @JelF, do you know something about it?
never used writer: false
and not suggest it
Should we just remove writer and reader options? Are there are usecases for ‘reader: false’?
@enthrops it would break back-compatibility. I wrote some examples in #20
#13 would fix problem described here, i think it is a better solution