Module: Hecks::Bluebook::DSL::ConstShim::Hook

Defined in:
lib/hecks/bluebook/dsl/const_shim.rb

Overview

A SCOPED NAME IS WRITTEN AS TEXT, NOT AS A CONSTANT PATH — see the note on admits: in AttributeCollector. A resolver returning a Module (so that Vocabulary::QueryComparator reaches a second const_missing) was tried and cannot be made to hold : Facade:: Surface installs EVERY aggregate name as a top-level constant, so once any facade is built, Vocabulary resolves to that real module and never reaches this hook at all. A spelling that works only before a facade exists is worse than one that always works.

Instance Method Summary collapse

Instance Method Details

#const_missing(name) ⇒ Object



71
72
73
74
# File 'lib/hecks/bluebook/dsl/const_shim.rb', line 71

def const_missing(name)
  resolver = ConstShim.resolver
  resolver ? resolver.call(name) : super
end