Allow block to be specified for cattr_reader, also add default param#49
Allow block to be specified for cattr_reader, also add default param#49eamonn-webster wants to merge 3 commits into
Conversation
My use case is to a reader only class attribute, but then I must be able to specify the initial value with a block or via default:
|
@andrewhavens / @wndxlori: the existing specs fail locally for me, something appears broken in the Duration code implementing 2.days.ago. I don't use that code, I'll try to take a look when I get a chance. |
| @class.rdrd.should == 'default' | ||
| end | ||
|
|
||
| it "should return default if one was given for specified" do |
I seem to remember getting stuck on that issue the last time I was attempting a fix in here. Thanks if you can figure it out! |
|
@wndxlori I can fix it by making |
I'm on board with that. If the specs run, let's |
|
This is the error when |
0ac7264 to
260f5a3
Compare
My use case is to a reader only class attribute, but then I must be able to specify the initial value with a block or via default: