-
Notifications
You must be signed in to change notification settings - Fork 22
Open
Description
It would be awesome if we could declare macros that simply repeat a signature. Lets say I have two or more methods that do similar things and accept the same arguments:
# Does a thing
#
# @rbs (String | Symbol, ?Hash[String | Symbol, untyped]) -> void
def does_a_thing(foo, bar = {})
...
end
# Does a similar thing
#
# @rbs (String | Symbol, ?Hash[String | Symbol, untyped]) -> void
def does_a_similar_ting(foo, bar = {})
...
endIt would be nice to be able to do:
# @rbs! macro interned_and_untyped_hash_returning_void: (String | Symbol, ?Hash[String | Symbol, untyped]) -> void
# Does a thing
#
# @rbs interned_and_untyped_hash_returning_void
def does_a_thing(foo, bar = {})
...
end
# Does a similar thing
#
# @rbs interned_and_untyped_hash_returning_void
def does_a_similar_ting(foo, bar = {})
...
endReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels