Method: Marktable::Formatters::Base.for

Defined in:
lib/marktable/formatters/base.rb

.for(type) ⇒ Object



11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/marktable/formatters/base.rb', line 11

def self.for(type)
  case type.to_sym
  when :markdown
    Markdown
  when :array
    Array
  when :csv
    CSV
  when :html
    HTML
  else
    raise ArgumentError, "Unknown table type: #{type}"
  end
end