module Dalziel
Constants
- VERSION
Public Class Methods
format_headers(headers)
click to toggle source
# File lib/dalziel.rb, line 7 def self.format_headers(headers) size = headers.keys.map(&:size).max headers.map { |k,v| "%-#{size + 2}s %s" % [ "#{k}:", v ] }.join("\n") end
indent(string)
click to toggle source
# File lib/dalziel.rb, line 12 def self.indent(string) string.split("\n").map { |line| " #{line}" }.join("\n") end