Class: Immudb::RootService
- Inherits:
-
Object
- Object
- Immudb::RootService
- Defined in:
- lib/immudb/root_service.rb
Instance Method Summary collapse
- #get ⇒ Object
- #init(dbname, service) ⇒ Object
-
#initialize ⇒ RootService
constructor
A new instance of RootService.
- #set(root) ⇒ Object
Constructor Details
#initialize ⇒ RootService
Returns a new instance of RootService.
15 16 17 18 19 |
# File 'lib/immudb/root_service.rb', line 15 def initialize @dbname = nil @cache = nil @service = nil end |
Instance Method Details
#get ⇒ Object
28 29 30 |
# File 'lib/immudb/root_service.rb', line 28 def get @cache ||= @service.current_state(Google::Protobuf::Empty.new) end |
#init(dbname, service) ⇒ Object
21 22 23 24 25 26 |
# File 'lib/immudb/root_service.rb', line 21 def init(dbname, service) @dbname = dbname @service = service state = @service.current_state(Google::Protobuf::Empty.new) @cache = state end |