Teek::UI::Scope Class
A component’s build-time namespace - ambient builder state, kept on
a stack parallel to WidgetDSL’s own @stack (see
WidgetDSL#component). A real object rather than a bare String/nil
on purpose: TOP_LEVEL is one unmistakable sentinel, checked by
identity (#top_level?/#equal?) rather than a value any caller
could accidentally collide with (nil, an empty string, a label
someone else also chose, …). Two Scope instances are never the
same scope just because they share a label - Document keys on
identity, so every WidgetDSL#component call gets a genuinely
fresh, distinct scope regardless of what label (if any) it’s given.
Inherits: Object
Instance Methods ↑
top_level?
Returns Boolean — whether this is TOP_LEVEL
Attributes ↑
label [R]
Returns Symbol, String, nil — a human-readable label, for error
messages/debugging - never part of identity/equality