On using Argument Forwarding with Doc style syntax, behavior is unexpected.
class Foo
# @rbs id: Integer
# @rbs return: void
def self.execute(...)
new(...).execute
end
# @rbs @id: Integer
# @rbs id: Integer
# @rbs return: void
def initialize(id)
@id = id
end
# @rbs return: void
def execute
# ...
end
end
Expected behavior
It produces the following output.
class Foo
def self.execute: (Integer id) -> void
@id: Integer
def initialize: (Integer id) -> void
def execute: () -> void
end
Actual behavior
It produces the following output.
class Foo
def self.execute: () -> void
@id: Integer
def initialize: (Integer id) -> void
def execute: () -> void
end
On the other hand, # @rbs and # : syntaxes produce the expected output.
System configuration
- rbs v3.6.1
- rbs-inline v0.10.0
- steep v1.8.3