From 4391b7175c6cf860b6c45a25d6e6d9a70daea783 Mon Sep 17 00:00:00 2001 From: Elliot Shank Date: Mon, 2 Feb 2015 17:19:15 -0600 Subject: [PATCH] Fix coding style in formatter. --- lib/awesome_print/formatter.rb | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/awesome_print/formatter.rb b/lib/awesome_print/formatter.rb index 0382b02..0e07ecb 100644 --- a/lib/awesome_print/formatter.rb +++ b/lib/awesome_print/formatter.rb @@ -319,7 +319,7 @@ module AwesomePrint # Utility methods. #------------------------------------------------------------------------------ def convert_to_hash(object) - if not object.respond_to?(:to_hash) + if ! object.respond_to?(:to_hash) return nil end if object.method(:to_hash).arity != 0 @@ -327,11 +327,7 @@ module AwesomePrint end hash = object.to_hash - if not hash - return nil - end - - if not hash.respond_to?(:keys) or not hash.respond_to?('[]') + if ! hash.respond_to?(:keys) || ! hash.respond_to?('[]') return nil end