Method: Konfig::Evaluator#names_by_value
- Defined in:
- lib/konfig/evaluator.rb
#names_by_value(a) ⇒ Hash
Converts an options-style nested array into a hash for easy name lookup
26 27 28 29 |
# File 'lib/konfig/evaluator.rb', line 26 def names_by_value(a) a = @data[a] if a.is_a?(String) || a.is_a?(Symbol) Hash[ a.map { |i| i.reverse } ] end |