Class: Sym::App::Password::Providers::DrbProvider
- Inherits:
-
Object
- Object
- Sym::App::Password::Providers::DrbProvider
- Defined in:
- lib/sym/app/password/providers/drb_provider.rb
Instance Attribute Summary collapse
-
#coin ⇒ Object
Returns the value of attribute coin.
Instance Method Summary collapse
- #alive? ⇒ Boolean
-
#initialize ⇒ DrbProvider
constructor
A new instance of DrbProvider.
- #read(*args) ⇒ Object
- #write(*args) ⇒ Object
Constructor Details
#initialize ⇒ DrbProvider
Returns a new instance of DrbProvider.
12 13 14 15 |
# File 'lib/sym/app/password/providers/drb_provider.rb', line 12 def initialize Coin.uri = Sym::Configuration.config.password_cache_arguments[:drb][:opts][:uri] self.coin = Coin end |
Instance Attribute Details
#coin ⇒ Object
Returns the value of attribute coin.
10 11 12 |
# File 'lib/sym/app/password/providers/drb_provider.rb', line 10 def coin @coin end |
Instance Method Details
#alive? ⇒ Boolean
17 18 19 20 |
# File 'lib/sym/app/password/providers/drb_provider.rb', line 17 def alive? self.read('bogus') rescue nil self.coin.server_running? end |
#read(*args) ⇒ Object
26 27 28 |
# File 'lib/sym/app/password/providers/drb_provider.rb', line 26 def read(*args) coin.send(:read, *args) end |
#write(*args) ⇒ Object
22 23 24 |
# File 'lib/sym/app/password/providers/drb_provider.rb', line 22 def write(*args) coin.server.send(:write, *args) end |