Class: DRbQS::ProcessList::ListDirectory

Inherits:
Object
  • Object
show all
Defined in:
lib/drbqs/config/process_list.rb

Direct Known Subclasses

Node, Server

Instance Method Summary collapse

Constructor Details

#initialize(dir) ⇒ ListDirectory

Returns a new instance of ListDirectory.



10
11
12
13
# File 'lib/drbqs/config/process_list.rb', line 10

def initialize(dir)
  @directory = dir
  FileUtils.mkdir_p(@directory) unless File.exist?(@directory)
end

Instance Method Details

#server_of_key_exist?(uri, key) ⇒ Boolean

Returns:

  • (Boolean)


61
62
63
64
65
66
# File 'lib/drbqs/config/process_list.rb', line 61

def server_of_key_exist?(uri, key)
  if data = get(uri)
    return data[:key] == key
  end
  false
end