Category "sorbet"

"Attempted to redefine prop" error with T::Struct

I'm trying to make use of T::Struct to avoid some boilerplate in a class: https://github.com/andyw8/codeclimate-engine-rb/pull/13/commits/d1fd72e22a4b9737ef2fe

How to handle memoization with nil values with Sorbet?

I have this method: def current_organization return @current_organization if defined?(@current_organization) subdomain = request.subdomain.to_s r

What runtime code can I write to extract the type notations as defined by Sorbet, to display to the user?

Is there a way to inspect the type notations in ruby/sorbet? I actually want to display those values in a form somewhere and instead of hardcoding in values lik

How can I resolve sorbet error: "Constants must have type annotations with T.let when specifying # typed: strict"?

This is similar to my question in How can I resolve sorbet error: "Use of undeclared variable"?, but for constants. I am experimenting with adding sorbet type i

How can I resolve sorbet error: "Constants must have type annotations with T.let when specifying # typed: strict"?

This is similar to my question in How can I resolve sorbet error: "Use of undeclared variable"?, but for constants. I am experimenting with adding sorbet type i