Class: Octodown::Support::Services::DocumentPresenter

Inherits:
Object
  • Object
show all
Defined in:
lib/octodown/support/services/document_presenter.rb

Class Method Summary collapse

Class Method Details

.call(file, options) ⇒ Object



7
8
9
10
11
12
13
14
15
# File 'lib/octodown/support/services/document_presenter.rb', line 7

def self.call(file, options)
  include Octodown::Renderer

  case options[:presenter]
  when :raw    then Raw
  when :html   then HTML
  when :server then Server
  end.new(GithubMarkdown.render(file, options), options).present
end