[Groonga-commit] ranguba/activegroonga at bff58ed [master] Use if/elsif instead of empty case

Back to archive index

Kouhei Sutou null+****@clear*****
Sat Sep 26 12:08:46 JST 2015


Kouhei Sutou	2015-09-26 12:08:46 +0900 (Sat, 26 Sep 2015)

  New Revision: bff58edd22f631be6fa0350e717e20885f7eec59
  https://github.com/ranguba/activegroonga/commit/bff58edd22f631be6fa0350e717e20885f7eec59

  Message:
    Use if/elsif instead of empty case

  Modified files:
    lib/active_groonga/migration.rb

  Modified: lib/active_groonga/migration.rb (+2 -3)
===================================================================
--- lib/active_groonga/migration.rb    2015-09-26 11:58:20 +0900 (f5b36eb)
+++ lib/active_groonga/migration.rb    2015-09-26 12:08:46 +0900 (c8f1027)
@@ -71,10 +71,9 @@ module ActiveGroonga
     end
 
     def root_directory
-      case
-      when defined? Rails
+      if defined?(Rails)
         Rails.root
-      when defined? Padrino
+      elsif defined?(Padrino)
         Padrino.root
       else
         Pathname.pwd
-------------- next part --------------
HTML����������������������������...
Descargar 



More information about the Groonga-commit mailing list
Back to archive index