Class: Paf::HashFormatter
- Defined in:
- lib/paf/hash_formatter.rb
Overview
Processing to format a PAF entry as a hash
Instance Method Summary collapse
Methods inherited from Formatter
format, #method_missing, #respond_to_missing?
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Paf::Formatter
Instance Method Details
#format(paf) ⇒ Object
6 7 8 9 10 11 12 13 |
# File 'lib/paf/hash_formatter.rb', line 6 def format(paf) super(paf) {}.tap do |hash| ([:lines] + post_attrs).each do |attr| hash[attr] = send(attr) unless send(attr).vacant? end end end |