mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Utility method to define a method and a stub override
This commit is contained in:
parent
8de457d80c
commit
85cc28c499
2 changed files with 6 additions and 1 deletions
|
@ -19,7 +19,7 @@ module Spectator
|
|||
{% if name %}@[DoubleName({{name}})]{% end %}
|
||||
class {{type_name.id}} < {{@type.name}}
|
||||
{% for key, value in value_methods %}
|
||||
stub def {{key.id}}
|
||||
inject_stub def {{key.id}}
|
||||
{{value}}
|
||||
end
|
||||
{% end %}
|
||||
|
|
|
@ -71,5 +71,10 @@ module Spectator
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
private macro inject_stub(method)
|
||||
{{method}}
|
||||
stub {{method}}
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue