Skip to content

Rename java classes to RubyBar and RubyFoo (as purbon had intended?) #7

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

Merged
merged 6 commits into from
Mar 7, 2016
Merged

Rename java classes to RubyBar and RubyFoo (as purbon had intended?) #7

merged 6 commits into from
Mar 7, 2016

Conversation

monkstone
Copy link
Contributor

@purbon I see you had proposed these class name changes (albeit in a fork), I hope you won't be offended but I have re-factored the module (it was failing my minitest), apparently there is no need for the module class to inherit from RubyObject. Further I have added examples where we do ruby to java and java to ruby conversions as would usually be case in real world. I have started documentation but where @enebo do I find the @JavaMethod signature documentation. Actually because I could find a decent reference I created my own https://github.com/jruby/jruby/wiki/Method-Signatures-and-Annotations-in-JRuby-extensions

@monkstone
Copy link
Contributor Author

@purbon I have now implement a RubyFoo class method as you had intended, the missing bit in your implementation was meta = true which to me shows you should favour minitest over rspec, behaviour is not everything. @enebo hope you don't mind the updating to the commit, I hope you will think it was worth it, I have certainly learned a bit, this guide/documentation is way overdue.

@enebo
Copy link
Member

enebo commented Mar 7, 2016

@monkstone yeah this is cool. One other thing possibly worth mentioning is if the name of the java method is the same as the ruby method name then you can omit the name attribute in the annotation. As the extension currently exists in this PR then I do not think there is an opportunity to show that off.

enebo added a commit that referenced this pull request Mar 7, 2016
Rename java classes to RubyBar and RubyFoo (as purbon had intended?)
@enebo enebo merged commit c4187f8 into jruby:master Mar 7, 2016
@purbon
Copy link
Contributor

purbon commented Mar 7, 2016

makes complete sense to me, I apologies for not keeping pushing on this, so many thing going on at the same time, but hope to revamp my effort here soon. Thanks for stepping in 👍

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.

3 participants