Class: ConsoleFormatter
- Inherits:
-
Struct
- Object
- Struct
- ConsoleFormatter
- Includes:
- Formatter
- Defined in:
- lib/console_formatter.rb
Instance Attribute Summary collapse
-
#format ⇒ Object
Returns the value of attribute format.
Instance Method Summary collapse
Methods included from Formatter
Instance Attribute Details
#format ⇒ Object
Returns the value of attribute format
1 2 3 |
# File 'lib/console_formatter.rb', line 1 def format @format end |
Instance Method Details
#present(records) ⇒ Object
4 5 6 |
# File 'lib/console_formatter.rb', line 4 def present records Hirb::Helpers::AutoTable.render(render_each(records, format), fields: format.keys, resize: false) end |