Open pocke opened 4 years ago
I think the best compromise is for rbs_rails to generate an overload with development/test/production methods. That way the common case is covered, but the overload can easily be edited to better suit the project.
What about during the generation of types, parsing file names in config/environments
folder and populating this interface with these values?
ref: https://github.com/pocke/rbs_rails/pull/30
Currently,
Rails.env
type is justActiveSupport::StringInquirer
, but it actually hasdevelopment?
method and so on.Now user can define an overload to define these methods.
But, probably it should be rbs_rails responsibility.
And maybe it can generate custom environments, such as
staging?
.