Class: Nacha::Formatter::FormatterFactory
- Inherits:
-
Object
- Object
- Nacha::Formatter::FormatterFactory
- Defined in:
- lib/nacha/formatter.rb
Class Method Summary collapse
Class Method Details
.get(format, records, options = {}) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/nacha/formatter.rb', line 10 def self.get(format, records, = {}) case format when :json JsonFormatter.new(records, ) when :html HtmlFormatter.new(records, ) when :markdown MarkdownFormatter.new(records, ) else raise ArgumentError, "Unknown format: #{format}" end end |