Class: Shhh::App::Password::Cache::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/shhh/app/password/cache/client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(host: nil, port: nil, config: {}) ⇒ Client

Returns a new instance of Client.



12
13
14
15
16
17
18
# File 'lib/shhh/app/password/cache/client.rb', line 12

def initialize(host: nil,
               port: nil,
               config: {})
  self.config =config
  self.host   = host
  self.port   = port
end

Instance Attribute Details

#configObject

Returns the value of attribute config.



10
11
12
# File 'lib/shhh/app/password/cache/client.rb', line 10

def config
  @config
end

#hostObject

The URI to connect to



9
10
11
# File 'lib/shhh/app/password/cache/client.rb', line 9

def host
  @host
end

#portObject

The URI to connect to



9
10
11
# File 'lib/shhh/app/password/cache/client.rb', line 9

def port
  @port
end

#uriObject

The URI to connect to



9
10
11
# File 'lib/shhh/app/password/cache/client.rb', line 9

def uri
  @uri
end

Instance Method Details

#startObject

Raises:

  • (NoMethodError)


27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# File 'lib/shhh/app/password/cache/client.rb', line 27

def start
  raise NoMethodError, 'not implemented'
  # Start a local DRbServer to handle callbacks.

  # Not necessary for this small example, but will be required
  # as soon as we pass a non-marshallable object as an argument
  # to a dRuby call.

  # Note: this must be called at least once per process to take any effect.
  # This is particularly important if your application forks.
  DRb.start_service
  # timeserver = DRbObject.new_with_uri(SERVER_URI)
  # puts timeserver.get_current_time
  # sleep 10
end