If we have an accessor defined before declaring a property in an included module, it will get overriden. The :accessor option allows us to specify whether we want Disposable::Twin to define accessors for that property.
module Titleable
def title
# ...
end
def title=(value)
# ...
end
end
class Song < Disposable::Twin
include Titleable
property :title, accessor: false
end
I know this is probably a fairly uncommon scenario, but I needed this in Shrine.
If we have an accessor defined before declaring a property in an included module, it will get overriden. The
:accessor
option allows us to specify whether we want Disposable::Twin to define accessors for that property.I know this is probably a fairly uncommon scenario, but I needed this in Shrine.