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.
|
# 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
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue