lib/rspeckled/plugins/awesome_print.rb in rspeckled-0.0.14 vs lib/rspeckled/plugins/awesome_print.rb in rspeckled-0.0.15

- old
+ new

@@ -7,11 +7,10 @@ # rubocop:disable Metrics/CyclomaticComplexity begin require 'awesome_print' require 'io/console' - # :reek:DuplicateMethodCall module Kernel def sap(*messages) columns = if IO.console IO.console.winsize[1] else @@ -47,13 +46,14 @@ Array(messages).each_with_index do |message, index| if message.respond_to?(:class) print "\e[32m" - if message.class.ancestors.include? ActiveRecord::Base + if defined?(::ActiveRecord::Base) && message.class.ancestors.include?(::ActiveRecord::Base) ap message.class else - print message.class + puts "Class: #{message.class}" + print "Class Name: #{message.class.name}" end print "\e[0m\n" puts end