lib/transcriber/resource/parser/property.rb in transcriber-0.0.21 vs lib/transcriber/resource/parser/property.rb in transcriber-0.0.22
- old
+ new
@@ -20,17 +20,12 @@
end
def translate_to_input(value, resource)
case translations
when nil then value
- when Hash then translate_to_input_from_hash(value)
+ when Hash then translations[value]
when Proc then resource.instance_eval(&translations)
end
- end
-
- def translate_to_input_from_hash(value)
- other = value.kind_of?(Symbol) ? value.to_s : value.to_sym
- translations.key?(value) ? translations[value] : translations.fetch(other, value)
end
def from_hash(value)
value
end