Method: Bl::Formatter#initialize
- Defined in:
- lib/bl/formatter.rb
#initialize(format: 'table') ⇒ Formatter
Returns a new instance of Formatter.
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/bl/formatter.rb', line 9 def initialize(format: 'table') @format = case format when 'table' Format::Hirb when 'json' Format::Json else abort 'format must be set to \'table\' or \'json\'' end end |