9684: Style nitpicks.
authorTom Clegg <tom@curoverse.com>
Fri, 19 Aug 2016 00:12:25 +0000 (20:12 -0400)
committerTom Clegg <tom@curoverse.com>
Fri, 19 Aug 2016 00:12:25 +0000 (20:12 -0400)
services/api/app/models/arvados_model.rb

index 3c79f021ae46fca6f152d5a191e7879d6183fecc..037903c7bc26058e1147f7e3fd59efafcb09165b 100644 (file)
@@ -391,15 +391,16 @@ class ArvadosModel < ActiveRecord::Base
       x.each do |k,v|
         return true if has_symbols?(k) or has_symbols?(v)
       end
-      false
     elsif x.is_a? Array
       x.each do |k|
         return true if has_symbols?(k)
       end
-      false
-    else
-      (x.class == Symbol) or (x.class == String and x.start_with?(':') and !x.start_with?('::'))
+    elsif x.is_a? Symbol
+      return true
+    elsif x.is_a? String
+      return true if x.start_with?(':') && !x.start_with?('::')
     end
+    false
   end
 
   def self.recursive_stringify x
@@ -413,12 +414,10 @@ class ArvadosModel < ActiveRecord::Base
       end
     elsif x.is_a? Symbol
       x.to_s
+    elsif x.is_a? String and x.start_with?(':') and !x.start_with?('::')
+      x[1..-1]
     else
-      if x.is_a? String and x.start_with?(':') and !x.start_with?('::')
-        x[1..-1]
-      else
-        x
-      end
+      x
     end
   end