Method: Berkshelf::CachedCookbook#pretty_print

Defined in:
lib/berkshelf/cached_cookbook.rb

#pretty_printObject



115
116
117
118
119
120
121
122
123
124
125
126
# File 'lib/berkshelf/cached_cookbook.rb', line 115

def pretty_print
  [].tap do |a|
    a.push "        Name: #{cookbook_name}" if name && name =~ /\S/
    a.push "     Version: #{version}" if version && version =~ /\S/
    a.push " Description: #{.description}" if .description && .description =~ /\S/
    a.push "      Author: #{.maintainer}" if .maintainer && .maintainer =~ /\S/
    a.push "       Email: #{.maintainer_email}" if .maintainer_email && .maintainer_email =~ /\S/
    a.push "     License: #{.license}" if .license && .license =~ /\S/
    a.push "   Platforms: #{pretty_map(.platforms, 14)}" if .platforms && !.platforms.empty?
    a.push "Dependencies: #{pretty_map(dependencies, 14)}" if dependencies && !dependencies.empty?
  end.join("\n")
end