Method: Decode::Definition#path

Defined in:
lib/decode/definition.rb

#pathObject Also known as: lexical_path

The lexical scope as an array of names. e.g. ‘[:Decode, :Definition]`



94
95
96
97
98
99
100
101
102
103
104
105
# File 'lib/decode/definition.rb', line 94

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