Method: OpenBEL::Helpers::Translators.for

Defined in:
app/openbel/api/helpers/translators.rb

.for(value) ⇒ BEL::Translator

Find a bel.rb translator plugin by value. The value is commonly the id, file extension, or media type associated with the translator plugin.

Parameters:

  • value (#to_s)

    used to look up translator plugin registered with bel.rb

Returns:

  • (BEL::Translator)

    the translator instance; or nil if one cannot be found



39
40
41
# File 'app/openbel/api/helpers/translators.rb', line 39

def self.for(value)
  BEL.translator(symbolize_value(value))
end