lib/heathen/converter.rb
# Converts the given document according to the action requested.
# @param action [String] the conversion action to perform
# @param content [String] the document body to be converted
# @param language [String] the document langauge (defaults to 'en')
# @return [String] the converted document body
Converts the given document according to the action requested.
Converts the given document according to the action requested .
def convert action, content, language='en'
      job = Job.new action, content, language
      processor = Heathen::Processor.new job: job, logger: @logger
      begin
        processor.perform_task action
      ensure
        processor.clean_up
      end
      job.content
    end
def convert action , content , language = 'en' job = Job . new action , content , language processor = Heathen :: Processor . new job : job , logger : @logger begin processor . perform_task action ensure processor . clean_up end job . content end
Converts the given document according to the action requested.
Converts the given document according to the action requested .
the converted document body
the converted document body
String
action
the conversion action to perform
the conversion action to perform
content
the document body to be converted
the document body to be converted
language
the document langauge (defaults to 'en')
the document langauge ( defaults to ' en ' )
'en')