Method: EnumIsh::Dictionary#translate_value
- Defined in:
- lib/enum_ish/dictionary.rb
#translate_value(value) ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/enum_ish/dictionary.rb', line 14 def translate_value(value) if value.is_a?(Array) value.map { |v| @dict[v] || v } else @dict[value] || value end end |