Method: Filegen::Data#lookup

Defined in:
lib/filegen/data.rb

#lookup(variable, default_value = '') ⇒ String

Lookup a variable within the data sources

Parameters:

  • variable (String)

    The variable to lookup

Returns:

  • (String)

    The value of the variable



26
27
28
# File 'lib/filegen/data.rb', line 26

def lookup(variable, default_value = '')
  try_to_fetch_unless_found_or_end(variable) || default_value
end