Navigation Menu

Skip to content

Commit

Permalink
Fix mismatched path to constant
Browse files Browse the repository at this point in the history
  • Loading branch information
piroor committed Apr 21, 2015
1 parent e25a4ef commit eef79ab
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions lib/droonga/engine_node.rb
Expand Up @@ -95,11 +95,11 @@ def readable?

def writable?
case NodeRole.my_role
when NodeMetadata::Role::SERVICE_PROVIDER
when NodeRole::SERVICE_PROVIDER
true
when NodeMetadata::Role::ABSORB_SOURCE
when NodeRole::ABSORB_SOURCE
absorb_source?
when NodeMetadata::Role::ABSORB_DESTINATION
when NodeRole::ABSORB_DESTINATION
absorb_destination?
else
false
Expand Down Expand Up @@ -157,7 +157,7 @@ def role
if @state
@state["role"]
else
NodeMetadata::Role::SERVICE_PROVIDER
NodeRole::SERVICE_PROVIDER
end
end

Expand All @@ -183,15 +183,15 @@ def dead?
end

def service_provider?
role == NodeMetadata::Role::SERVICE_PROVIDER
role == NodeRole::SERVICE_PROVIDER
end

def absorb_source?
role == NodeMetadata::Role::ABSORB_SOURCE
role == NodeRole::ABSORB_SOURCE
end

def absorb_destination?
role == NodeMetadata::Role::ABSORB_DESTINATION
role == NodeRole::ABSORB_DESTINATION
end

def complete_service_provider?
Expand All @@ -201,9 +201,9 @@ def complete_service_provider?
def really_writable?
return false unless writable?
case NodeRole.my_role
when NodeMetadata::Role::SERVICE_PROVIDER
when NodeRole::SERVICE_PROVIDER
service_provider?
when NodeMetadata::Role::ABSORB_SOURCE
when NodeRole::ABSORB_SOURCE
not absorb_destination?
else
true
Expand Down

0 comments on commit eef79ab

Please sign in to comment.