-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow block to be specified for cattr_reader, also add default param #49
base: master
Are you sure you want to change the base?
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
given for instance
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: