Skip to content
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

Founded returns nil if any fields are nil #5

Open
fletchrichman opened this issue May 15, 2013 · 1 comment
Open

Founded returns nil if any fields are nil #5

fletchrichman opened this issue May 15, 2013 · 1 comment

Comments

@fletchrichman
Copy link
Contributor

The founded method will return nil if any of the fields are nil, and the individual fields are not accessible, so when a company gives founded_year and founded_month but not founded_day, there is no way to access any of the information.

I think just adding founded_year, founded_month, and founded_day to the attr_reader would fix this, happy to do a pull request if you would like.

@tylercunnion
Copy link
Owner

Yeah, putting attr_readers in for those is probably the way to go. I left them out initially as I was working under the assumption that the dates were an all or nothing proposition (since of course there's no actual doc or specification). I'll go ahead and add this in, and I think this also means the founded, deadpooled, etc. methods should be deprecated if they can't be relied upon.

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

No branches or pull requests

2 participants