Method: ContentBlockTools::ContentBlock#render

Defined in:
lib/content_block_tools/content_block.rb

#renderstring

Calls the appropriate presenter class to return a HTML representation of a content block. Defaults to Presenters::BasePresenter

Returns:

  • (string)

    A HTML representation of the content block



46
47
48
49
50
# File 'lib/content_block_tools/content_block.rb', line 46

def render
  CONTENT_PRESENTERS
    .fetch(document_type, Presenters::BasePresenter)
    .new(self).render
end