rbs
rbs copied to clipboard
Better support for singleton types in modules
Motivating example:
module SoftDeletable : ActiveRecord::Base
module ClassMethods : singleton(ActiveRecord::Base) # New syntax!
end
end
Here, the implementation of SoftDeletable would use ActiveRecord::Base methods from included hook:
module SoftDeletable
included do
scope :deleted, ...
end
end
- Allow having
singletontypes in module self type constraints - Let
singleton(SoftDeletable)<singleton(ActiveRecord::Base)(but what to do at the module context?)