class AwesomePrint::Formatter

Public Instance Methods

awesome_self(object, type) click to toggle source
# File lib/luffa/patches/awesome_print.rb, line 6
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