Coder Social home page Coder Social logo

Comments (6)

brendon avatar brendon commented on September 3, 2024

Hi @balajivenkatesh, the public method is defined here:

https://github.com/mixonic/ranked-model/blob/master/lib/ranked-model.rb#L64

Are you calling this on the base model object?

from ranked-model.

balajivenkatesh avatar balajivenkatesh commented on September 3, 2024

@brendon thanks for the quick response!

My gem version was 0.4.2 and the latest is 0.4.6
I updated with bundle update ranked-model and the method is available now.
Closing issue.

from ranked-model.

brendon avatar brendon commented on September 3, 2024

Oh sorry, I see what you mean. Looks like we may have forgot to declare that method public :) Would you like to do a PR fixing this, along with a test for it?

I just see your new message now, are you sure it's working? It looks like we're defining it in the private area still.

from ranked-model.

brendon avatar brendon commented on September 3, 2024

I'm guessing this line is probably not really necessary anymore? https://github.com/mixonic/ranked-model/blob/master/lib/ranked-model.rb#L68

from ranked-model.

balajivenkatesh avatar balajivenkatesh commented on September 3, 2024

Yes, that line might not be necessary anymore - define_method doesn't explicitly say it but it might be the case.
https://stackoverflow.com/questions/3782026/how-do-i-dynamically-define-a-method-as-private says how private dynamic methods can be specified

from ranked-model.

brendon avatar brendon commented on September 3, 2024

Thanks @balajivenkatesh

from ranked-model.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.