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: 3243ae2f64cf990b259117495c70674952544bf3 https://github.com/droonga/droonga-engine/commit/3243ae2f64cf990b259117495c70674952544bf3 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:49:39 +0900 (7b1cfaa) +++ lib/droonga/engine_node.rb 2015-01-06 19:54:01 +0900 (1103fe4) @@ -69,34 +69,6 @@ module Droonga 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 role - if @state - @state["role"] - else - NodeMetadata::Role::SERVICE_PROVIDER - end - end - def forwardable? return false unless live? role == @sender_role @@ -142,6 +114,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����������������������������...ダウンロード