Class: Erlash::ContextFormatter
- Inherits:
-
TemplateFormatter
- Object
- TemplateFormatter
- Erlash::ContextFormatter
- Defined in:
- lib/erlash/formatters/context_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
#format ⇒ Object
3 4 5 6 7 8 |
# File 'lib/erlash/formatters/context_formatter.rb', line 3 def format [].tap do |acc| acc << 'Context:' if object.formatter.hints? acc << format_elem(object.value) end end |