Skip to content
This repository has been archived by the owner on Jun 2, 2021. It is now read-only.

Incorrect 'default' option behavior for getter #19

Open
loadkpi opened this issue Apr 16, 2018 · 5 comments · May be fixed by #20
Open

Incorrect 'default' option behavior for getter #19

loadkpi opened this issue Apr 16, 2018 · 5 comments · May be fixed by #20

Comments

@loadkpi
Copy link

loadkpi commented Apr 16, 2018

For example:

class Person
  include Tainbox
  attribute :name, default: 'Vasya', writer: false
end
Person.new.name # => nil

It is expected to be 'Vasya'.

@loadkpi loadkpi linked a pull request Apr 16, 2018 that will close this issue
@frvade
Copy link

frvade commented Apr 16, 2018

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?

@JelF
Copy link

JelF commented Apr 16, 2018

never used writer: false and not suggest it

@enthrops
Copy link
Owner

Should we just remove writer and reader options? Are there are usecases for ‘reader: false’?

@JelF
Copy link

JelF commented Apr 16, 2018

@enthrops it would break back-compatibility. I wrote some examples in #20

@JelF
Copy link

JelF commented Apr 16, 2018

#13 would fix problem described here, i think it is a better solution

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants