The model is defined as follows
attr_accessor :delay_type, :stop_type
This raises the following warning by reek
Order#stop_type is a writable attribute
Any idea on how to fix this?
The model is defined as follows
attr_accessor :delay_type, :stop_type
This raises the following warning by reek
Order#stop_type is a writable attribute
Any idea on how to fix this?
Copyright © 2021 Jogjafile Inc.
attr_accessor
creates bothattr_reader
andattr_writer
.You have created both but you are not using the writer so reek is raising a warning that you have extra code that is not being used.
You should either ignore the warning if you will use the writer later or do this: