Sha256: b09b8c98cc2828bff20c77afd02bee16797d23634482beae316e96dafc00b85e
Contents?: true
Size: 483 Bytes
Versions: 56
Compression:
Stored size: 483 Bytes
Contents
require 'awesome_print' # Monkey patch for AwesomePrint + objects that implement '=='. # Available in awesome-print 1.6, but requires a cross-platform update. module AwesomePrint class Formatter def awesome_self(object, type) if @options[:raw] && object.instance_variables.any? awesome_object(object) elsif object.respond_to?(:to_hash) awesome_hash(object.to_hash) else colorize(object.inspect.to_s, type) end end end end
Version data entries
56 entries across 56 versions & 2 rubygems