Comments (8)
Here's another fun one:
from sorbet-rails.
And there are also _ids
getters and setters:
module Game::GeneratedAssociationMethods
def game_genre_ids(); end
def game_genre_ids=(ids); end
def game_platform_ids(); end
def game_platform_ids=(ids); end
def game_publisher_ids(); end
def game_publisher_ids=(ids); end
def game_purchase_ids(); end
def game_purchase_ids=(ids); end
end
from sorbet-rails.
And reload_
:
module Game::GeneratedAssociationMethods
def reload_cover_attachment(); end
def reload_cover_blob(); end
def reload_pg_search_document(); end
def reload_series(); end
end
As well as build_
/create_
:
module Game::GeneratedAssociationMethods
def build_cover_attachment(*args, &block); end
def build_pg_search_document(*args, &block); end
def build_series(*args, &block); end
def create_cover_attachment(*args, &block); end
def create_cover_attachment!(*args, &block); end
def create_pg_search_document(*args, &block); end
def create_pg_search_document!(*args, &block); end
def create_series(*args, &block); end
def create_series!(*args, &block); end
end
from sorbet-rails.
Since they aren't really used, there is little value to generate them, except to clean up hidden.rbi file. If you'd like to clean these up properly, feel free to contribute a plugin that generate the methods, but we don't add the plugin to the default list.
from sorbet-rails.
I've created a working plugin (although everything is essentially untyped): https://github.com/connorshea/VideoGameList/blob/9c9f1d0d1fb2394103fad05b77295007c0a7c2ae/lib/cursed_rbi_plugin.rb
It removed a little over 5k lines out of my 35k line hidden.rbi
:)
@manhhung741 do you still want this? :) Should I rename it from 'CursedRbiPlugin'? And how should the user enable its usage?
from sorbet-rails.
from sorbet-rails.
from sorbet-rails.
Something to do with metaprogramming, probably. Maybe MetaprogrammingGarageSalePlugin
? :P
from sorbet-rails.
Related Issues (20)
- Method request does not exist on Api::BaseController HOT 2
- Stack overflow when running `srb rbi hidden-definitions` HOT 3
- sigs missing blocks raise errors in latest sorbet release (0.5.6341+) HOT 5
- active_record_relation.rbi ends up with false sigil HOT 4
- Cannot change default_checked_level of Sorbet when using this gem. HOT 3
- Feature: Re-generate model RBIs on db:migrate HOT 2
- Feature: custom methods on associations.
- Signatures not generated for models using new ActiveRecord::DelegatedType
- Has_many with scope on association HOT 2
- Decide whether to drop Ruby 2.4 and Ruby 2.5 HOT 2
- Feature Request: --verify option for CI HOT 1
- FR: helper_generator_class
- Method object does not exist on ActionView::Helpers::FormBuilder HOT 1
- Don't know how to build task 'rails_rbi:routes' HOT 1
- Unable to resolve constant BatchEnumerator HOT 1
- Enum override in ActiveRecordOverrides breaks with Rails 7 HOT 5
- Lots of T.nilable(T.untyped) errors after sorbet 0.5.9556
- Classic Loader issues with srb init HOT 1
- warning: already initialized constant RAILS_RBI_RAKE_DIR
- regression on update to sorbet 0.5.9892+ HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sorbet-rails.