YUKI Hiroshi
null+****@clear*****
Fri Jun 27 14:21:37 JST 2014
YUKI Hiroshi 2014-06-27 14:21:37 +0900 (Fri, 27 Jun 2014) New Revision: ccbfdbc05c75df847d6f0021a133a7a4e6a5a0d5 https://github.com/droonga/droonga-engine/commit/ccbfdbc05c75df847d6f0021a133a7a4e6a5a0d5 Message: Don't use guard-if/unless multiple times Modified files: lib/droonga/serf.rb Modified: lib/droonga/serf.rb (+7 -6) =================================================================== --- lib/droonga/serf.rb 2014-06-27 14:07:40 +0900 (6e25801) +++ lib/droonga/serf.rb 2014-06-27 14:21:37 +0900 (e1897c7) @@ -147,12 +147,13 @@ module Droonga end def role - return :default unless status[:role] - - role = status[:role].to_sym - return :default unless self.class::ROLE.keys.include?(role) - - role + if status[:role] + role = status[:role].to_sym + if self.class::ROLE.keys.include?(role) + return role + end + end + :default end def port -------------- next part -------------- HTML����������������������������... Télécharger