mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Implement #let!
This commit is contained in:
parent
709b226f8e
commit
b1d70453cf
1 changed files with 8 additions and 6 deletions
|
@ -45,6 +45,8 @@ module Spectator
|
|||
end
|
||||
|
||||
macro let(name, &block)
|
||||
let!({{name}}!) {{block}}
|
||||
|
||||
module Context
|
||||
@_%proxy : ValueProxy?
|
||||
|
||||
|
@ -57,17 +59,17 @@ module Spectator
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def {{name.id}}!
|
||||
macro let!(name, &block)
|
||||
module Context
|
||||
def {{name.id}}
|
||||
{{block.body}}
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def let!
|
||||
raise NotImplementedError.new("Spectator::DSL#let!")
|
||||
end
|
||||
|
||||
macro is_expected
|
||||
expect(subject)
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue