YUKI Hiroshi
null+****@clear*****
Tue Jan 6 19:54:01 JST 2015
YUKI Hiroshi 2015-01-06 19:54:01 +0900 (Tue, 06 Jan 2015) New Revision: da8aacd8555f71689c02402aec902390905f2aa1 https://github.com/droonga/droonga-engine/commit/da8aacd8555f71689c02402aec902390905f2aa1 Message: Make methods not called from outside private Modified files: lib/droonga/engine_node.rb Modified: lib/droonga/engine_node.rb (+28 -28) =================================================================== --- lib/droonga/engine_node.rb 2015-01-06 19:48:35 +0900 (f0aa781) +++ lib/droonga/engine_node.rb 2015-01-06 19:54:01 +0900 (7806d53) @@ -55,34 +55,6 @@ module Droonga output(message, destination) end - def live? - @state.nil? or @state["live"] - end - - def dead? - not live? - end - - def service_provider? - role == NodeMetadata::Role::SERVICE_PROVIDER - end - - def absorb_source? - role == NodeMetadata::Role::ABSORB_SOURCE - end - - def absorb_destination? - role == NodeMetadata::Role::ABSORB_DESTINATION - end - - def role - if @state - @state["role"] - else - NodeMetadata::Role::SERVICE_PROVIDER - end - end - def forwardable? return false unless live? role == @sender_role @@ -116,6 +88,34 @@ module Droonga end private + def role + if @state + @state["role"] + else + NodeMetadata::Role::SERVICE_PROVIDER + end + end + + def live? + @state.nil? or @state["live"] + end + + def dead? + not live? + end + + def service_provider? + role == NodeMetadata::Role::SERVICE_PROVIDER + end + + def absorb_source? + role == NodeMetadata::Role::ABSORB_SOURCE + end + + def absorb_destination? + role == NodeMetadata::Role::ABSORB_DESTINATION + end + def output(message, destination) command = destination["type"] receiver = destination["to"] -------------- next part -------------- HTML����������������������������...Download