mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Handle injecting stubbed abstract method
This commit is contained in:
parent
9091b8d027
commit
25f546245a
1 changed files with 6 additions and 2 deletions
|
@ -270,8 +270,12 @@ module Spectator
|
|||
|
||||
# Utility for defining a stubbed method and a fallback.
|
||||
private macro inject_stub(method)
|
||||
{{method}}
|
||||
stub {{method}}
|
||||
{% if method.abstract? %}
|
||||
abstract_stub {{method}}
|
||||
{% else %}
|
||||
{{method}}
|
||||
stub {{method}}
|
||||
{% end %}
|
||||
end
|
||||
|
||||
# Redefines all methods on a type to conditionally respond to messages.
|
||||
|
|
Loading…
Reference in a new issue