spoom
spoom copied to clipboard
Add command `spoom srb sigs translate` to translate RBI signatures into RBS comments
Consider the following file.rb:
# typed: strict
class Foo
sig { returns(String) }
attr_reader :x
sig { params(x: String).void }
def initialize(x)
@x = x
end
end
We can translate the RBI signatures it contains using the introduced Spoom command:
$ spoom srb sigs translate file.rb
Wich will update the file contents as follows:
# typed: strict
class Foo
#: String
attr_reader :x
#: (String x) -> void
def initialize(x)
@x = x
end
end