Change empty args to reusable readonly instance

This commit is contained in:
Michael Miller 2022-07-10 17:51:05 -06:00
parent 29389f1dbf
commit 9eb2946be6
No known key found for this signature in database
GPG Key ID: 32B47AE8F388A1FF
1 changed files with 2 additions and 4 deletions

View File

@ -22,10 +22,8 @@ module Spectator
new(args, kwargs)
end
# Constructs an instance of empty arguments.
macro empty
{{@type.name(generic_args: false)}}.capture
end
# Instance of empty arguments.
class_getter empty : Arguments(Tuple(), NamedTuple()) = capture
# Returns the positional argument at the specified index.
def [](index : Int)