Class: Marktable::Tables::Base
- Inherits:
-
Object
- Object
- Marktable::Tables::Base
- Defined in:
- lib/marktable/tables/base.rb
Defined Under Namespace
Classes: Result
Class Method Summary collapse
Class Method Details
.blank ⇒ Object
28 29 30 |
# File 'lib/marktable/tables/base.rb', line 28 def self.blank Result.new(rows: [], headers: nil) end |
.for(type) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/marktable/tables/base.rb', line 13 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 |