Class: Erlash::MainArrayFormatter

Inherits:
TemplateFormatter show all
Defined in:
lib/erlash/formatters/main_array_formatter.rb

Instance Attribute Summary

Attributes inherited from TemplateFormatter

#formatter, #object, #opts, #output

Instance Method Summary collapse

Methods inherited from TemplateFormatter

call, format, #format_elem, #initialize, #safe_call

Constructor Details

This class inherits a constructor from Erlash::TemplateFormatter

Instance Method Details

#formatObject



3
4
5
6
7
# File 'lib/erlash/formatters/main_array_formatter.rb', line 3

def format
  object.each_with_object([]) do |e, s|
    s << "  - #{format_elem(e)}"
  end
end