1
0
Fork 0
mirror of https://github.com/awesome-print/awesome_print synced 2023-03-27 23:22:34 -04:00

Fix coding style in formatter.

This commit is contained in:
Elliot Shank 2015-02-02 17:19:15 -06:00
parent 4ee2ade5f7
commit 4391b7175c

View file

@ -319,7 +319,7 @@ module AwesomePrint
# Utility methods. # Utility methods.
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
def convert_to_hash(object) def convert_to_hash(object)
if not object.respond_to?(:to_hash) if ! object.respond_to?(:to_hash)
return nil return nil
end end
if object.method(:to_hash).arity != 0 if object.method(:to_hash).arity != 0
@ -327,11 +327,7 @@ module AwesomePrint
end end
hash = object.to_hash hash = object.to_hash
if not hash if ! hash.respond_to?(:keys) || ! hash.respond_to?('[]')
return nil
end
if not hash.respond_to?(:keys) or not hash.respond_to?('[]')
return nil return nil
end end