class

Myst::ClosureScope

Inherits Myst::Scope / Reference / Object

A ClosureScope is a specially kind of Scope that allows direct access to closured entries from the parent scope, but also does not allow access to scopes beyond the parent.

Constructors

new(closed_scope : Scope, parent : Scope | Nil = nil)
Source

Instance methods

[]=(key : String, value : MTValue)
Source
[]?(key : String)

The shorthand access notations ([]?, [], []=) will all fall back to the parent scope if the value does not exist in this scope.

The longhand has_key? and assign only operate on this scope.

Source
assign(key : String, value : MTValue)
Source
closed_scope
Source
closed_scope=(closed_scope : Scope)
Source
has_key?(key : String)
Source