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:
parent
4ee2ade5f7
commit
4391b7175c
1 changed files with 2 additions and 6 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue