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)
|
macro context(what, source_file = __FILE__, source_line = __LINE__, type = "Context", &block)
|
||||||
{% safe_name = what.id.stringify.gsub(/\W+/, "_") %}
|
{% safe_name = what.id.stringify.gsub(/\W+/, "_") %}
|
||||||
{% module_name = (type.id + safe_name.camelcase).id %}
|
{% module_name = (type.id + safe_name.camelcase).id %}
|
||||||
{% parent_locals_module = PARENT_LOCALS_MODULE %}
|
{% context_module = CONTEXT_MODULE %}
|
||||||
module {{module_name.id}}
|
module {{module_name.id}}
|
||||||
include ::Spectator::DSL
|
include ::Spectator::DSL
|
||||||
|
|
||||||
PARENT_LOCALS_MODULE = {{parent_locals_module.id}}::{{module_name.id}}
|
CONTEXT_MODULE = {{context_module.id}}::{{module_name.id}}
|
||||||
|
|
||||||
module Locals
|
module Locals
|
||||||
include {{parent_locals_module.id}}::Locals
|
include {{context_module.id}}::Locals
|
||||||
|
|
||||||
{% if what.is_a?(Path) %}
|
{% if what.is_a?(Path) %}
|
||||||
def described_class
|
def described_class
|
||||||
|
|
|
@ -4,7 +4,7 @@ module Spectator
|
||||||
module Examples
|
module Examples
|
||||||
include ::Spectator::DSL
|
include ::Spectator::DSL
|
||||||
|
|
||||||
PARENT_LOCALS_MODULE = ::Spectator::Examples
|
CONTEXT_MODULE = ::Spectator::Examples
|
||||||
|
|
||||||
module Locals
|
module Locals
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue