Class: Tableasy::FormattersContext
- Inherits:
-
Object
- Object
- Tableasy::FormattersContext
- Defined in:
- lib/tableasy.rb
Class Method Summary collapse
Class Method Details
.formatter(name, options = {}, &block) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/tableasy.rb', line 11 def self.formatter(name, = {}, &block) Formatter.new(&block).tap do |formatter| formatter.format_header { nil } if .delete(:no_header) FormattersHelper.module_eval do define_method(name) do |column, *args| Formatter::Column.new(self, formatter, column, *args.push()) end end end end |