Class: Hotdog::Formatters::Yaml

Inherits:
BaseFormatter show all
Defined in:
lib/hotdog/formatters/yaml.rb

Instance Method Summary collapse

Instance Method Details

#format(result, options = {}) ⇒ Object



8
9
10
11
12
13
14
# File 'lib/hotdog/formatters/yaml.rb', line 8

def format(result, options={})
  result = prepare(result)
  if options[:headers] and options[:fields]
    result.unshift(options[:fields])
  end
  result.to_yaml
end