Is there any way to find out if a module present on https://apidock.com/ is part of the public API? Some of them, like ActionDispatch::Http::URL, have no description but many of their methods do. Is there a rule or something?
Asked
Active
Viewed 56 times
0
-
Use the official documentation which is at [api.rubyonrails.org](https://api.rubyonrails.org/classes/ActionDispatch/Http/URL.html). Apidock.com is just an annoying commercial site that slurps documentation and serves it up with ads and has tons of google juice since there are so many link that points to it. What you find there is often incomplete or out of date. Its like the W3CSchools of the Ruby world. – max May 05 '20 at 21:18
-
@max Alright, thank you! But being present on api.rubyonrails.org it means it's part of the public API? I see the [instance methods examples](https://api.rubyonrails.org/classes/ActionDispatch/Http/URL.html#method-i-host) describe them when they are called from a module including that one being presented. Does that mean it's not meant to be used as a standalone module? – Vlad Florescu May 07 '20 at 12:05
-
You can't call instance methods on a module. They are only available when you include the module in a class. – max May 07 '20 at 12:14
-
@max You're right, that was dumb. Actually what I was doing was using a class method `ActionDispatch::Http::URL.url_for(not_default_url_options)` and I wanted to know if that's fine given there is no module or method description. – Vlad Florescu May 07 '20 at 15:44