mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Handle stubbed methods with arguments
This commit is contained in:
parent
47ca96801b
commit
0528ddc2ab
1 changed files with 2 additions and 4 deletions
|
@ -1,12 +1,10 @@
|
||||||
module Spectator
|
module Spectator
|
||||||
abstract class Double
|
abstract class Double
|
||||||
macro stub(definition)
|
macro stub(definition)
|
||||||
def {{definition.name.id}}
|
delegate {{definition.name.id}}, to: @internal
|
||||||
@internal.{{definition.name.id}}
|
|
||||||
end
|
|
||||||
|
|
||||||
private class Internal
|
private class Internal
|
||||||
def {{definition.name.id}}
|
def {{definition.name.id}}({{definition.args.splat}})
|
||||||
{{definition.block.body}}
|
{{definition.block.body}}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue