Class: GfmToBlockkit::Converters::Table

Inherits:
Base
  • Object
show all
Defined in:
lib/gfm_to_blockkit/converters/table.rb,
lib/gfm_to_blockkit/converters/table/native.rb,
lib/gfm_to_blockkit/converters/table/preformatted.rb

Defined Under Namespace

Classes: Native, Preformatted

Instance Method Summary collapse

Methods inherited from Base

converter_for, handles, #initialize, #render_child_as_elements

Constructor Details

This class inherits a constructor from GfmToBlockkit::Converters::Base

Instance Method Details

#convert(node) ⇒ Object



8
9
10
11
12
13
14
# File 'lib/gfm_to_blockkit/converters/table.rb', line 8

def convert(node)
  if @context.table_format == :native
    Table::Native.new(@context).convert(node)
  else
    Table::Preformatted.new(@context).convert(node)
  end
end