mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Use more correct name for constant
This commit is contained in:
parent
f7eeb2b2a3
commit
3e7f43009f
2 changed files with 4 additions and 4 deletions
|
@ -9,14 +9,14 @@ module Spectator
|
|||
macro context(what, source_file = __FILE__, source_line = __LINE__, type = "Context", &block)
|
||||
{% safe_name = what.id.stringify.gsub(/\W+/, "_") %}
|
||||
{% module_name = (type.id + safe_name.camelcase).id %}
|
||||
{% parent_locals_module = PARENT_LOCALS_MODULE %}
|
||||
{% context_module = CONTEXT_MODULE %}
|
||||
module {{module_name.id}}
|
||||
include ::Spectator::DSL
|
||||
|
||||
PARENT_LOCALS_MODULE = {{parent_locals_module.id}}::{{module_name.id}}
|
||||
CONTEXT_MODULE = {{context_module.id}}::{{module_name.id}}
|
||||
|
||||
module Locals
|
||||
include {{parent_locals_module.id}}::Locals
|
||||
include {{context_module.id}}::Locals
|
||||
|
||||
{% if what.is_a?(Path) %}
|
||||
def described_class
|
||||
|
|
|
@ -4,7 +4,7 @@ module Spectator
|
|||
module Examples
|
||||
include ::Spectator::DSL
|
||||
|
||||
PARENT_LOCALS_MODULE = ::Spectator::Examples
|
||||
CONTEXT_MODULE = ::Spectator::Examples
|
||||
|
||||
module Locals
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue