lib/converter.rb
# Converts the supplied content. Nothing gets saved.
# @param action [String] the conversion to perform
# @param orig_content [String] the body of the file to convert
# @param language [String] the file's language
# @return [String] the converted file body
Converts the supplied content. Nothing gets saved.
Converts the supplied content . Nothing gets saved .
def convert_file action, orig_content, language='en'
      Heathen::Converter.new(logger:@logger).convert(action, orig_content, language)
    rescue Heathen::TaskNotFound => e
      raise InvalidAction.new( e.message )
    rescue Heathen::Error => e
      raise ConversionError.new( e )
    end
def convert_file action , orig_content , language = 'en' Heathen :: Converter . new ( logger : @logger ) . convert ( action , orig_content , language ) rescue Heathen :: TaskNotFound => e raise InvalidAction . new ( e . message ) rescue Heathen :: Error => e raise ConversionError . new ( e ) end
Converts the supplied content.
Converts the supplied content .
the converted file body
the converted file body
String
action
the conversion to perform
the conversion to perform
orig_content
the body of the file to convert
the body of the file to convert
language
the file's language
the file ' s language