Method: Decode::Definition#path

Defined in:
lib/decode/definition.rb

#pathArray Also known as: lexical_path

The lexical scope which is an array of lexical Key instances as generated by key.

Returns:

  • (Array)


87
88
89
90
91
92
93
94
95
96
97
98
# File 'lib/decode/definition.rb', line 87

def path
	if @path
		# Cached version:
		@path
	elsif @parent
		# Merge with parent:
		@path = [*@parent.path, @name].freeze
	else
		# At top:
		@path = [@name].freeze
	end
end