Module: Unifig::Vars

Extended by:
TSort
Defined in:
lib/unifig/vars.rb

Overview

Information about variables after loading a configuration.

Class Method Summary collapse

Class Method Details

.[](name) ⇒ Unifig::Var or nil

Retrieve a variable by name unless it does not exist.

Parameters:

  • name (Symbol)

    The name of the variable.

Returns:


49
50
51
52
# File 'lib/unifig/vars.rb', line 49

def [](name)
  @map ||= {}
  @map[name]
end

.listArray<Unifig::Var>

Returns a list the variables.

Returns:


40
41
42
# File 'lib/unifig/vars.rb', line 40

def list
  (@map || {}).values
end