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

An incorrect type when parsing JSON in the Asset class for initialization #66

Merged
merged 1 commit into from
Jun 11, 2014

Conversation

DevinCarr
Copy link
Contributor

In the Assets class in the initialization, the JSON parsing required a to_i" so that the 'lastScanDate' as a string can be divided by 1000 without throwing a 'NoMethodError' for the forward slash on a string object.

…a ".to_i" so that the 'lastScanDate' as a string can be divided by 1000 without throwing a 'NoMethodError' for the forward slash.
mdaines-r7 added a commit that referenced this pull request Jun 11, 2014
An incorrect type when parsing JSON in the Asset class for initialization
@mdaines-r7 mdaines-r7 merged commit 6b7c9f7 into rapid7:master Jun 11, 2014
@mdaines-r7
Copy link
Contributor

Thanks.

Curious: did you encounter an error because of this? I thought that one was working.

@DevinCarr
Copy link
Contributor Author

So when I attempted to initialize an Asset with a json that I created the error was thrown, but then I realized later that I didn't need to do it that way. So it probably was working but I also thought it wouldn't hurt just in case the json casted the value to a string. Sorry for the inconvenience I may have caused.

@mdaines-r7
Copy link
Contributor

Yeah, we need a bit better documentation on the guts and how people can use the classes. Some of the constructors are really just there for other methods to call. Thanks for the change. Better safe than sorry.

@limhoff-r7
Copy link

For better docs you should switch to YARD and Markdown. YARD allows better documenting of options hashes (http://rubydoc.info/gems/yard/file/docs/Tags.md#option). Need convincing? Look at this: http://slides.com/lukeimhoff/yard

@erran-r7
Copy link
Contributor

@DevinCarr Dude, you went to McNeil with me. 👍 It's awesome to see someone else my age in our field already.

@DevinCarr
Copy link
Contributor Author

@erran-r7 Awesome, nice to hear from you.

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

Successfully merging this pull request may close these issues.

4 participants