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

View file

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