Sha256: e303009230187a3e4899c90a37f9c53c65bcb1e73c16189210be863a8c1adfd4

Contents?: true

Size: 487 Bytes

Versions: 1

Compression:

Stored size: 487 Bytes

Contents

#encoding: utf-8

#Main
module CommandExec
  #Formatting output
  module Formatter
    #Style as yaml string
    class YAML < CommandExec::Formatter::Hash

      # convert the prepared output to a yaml string
      #
      # @param [Array,Symbol) fields
      #   the fields which should be outputted
      #
      # @return [String] 
      #   the output formatted as a xml string
      def output(*fields)
        Psych.dump prepare_output(fields.flatten) 
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
command_exec-0.2.0 lib/command_exec/formatter/yaml.rb