Class: Robut::Storage::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/robut/storage/base.rb

Overview

A Robut::Storage implementation is a simple key-value store accessible to all plugins. Plugins can access the global storage object with the method store. All storage implementations inherit from Robut::Storage::Base. All implementations must implement the class methods [] and []=.

Direct Known Subclasses

HashStore, YamlStore

Class Method Summary collapse

Class Method Details

.[](k) ⇒ Object

Returns the value at the key k.



16
17
18
# File 'lib/robut/storage/base.rb', line 16

def [](k)
  raise "Must be implemented"
end

.[]=(k, v) ⇒ Object

Sets the key k to the value v in the current storage system



11
12
13
# File 'lib/robut/storage/base.rb', line 11

def []=(k,v)
  raise "Must be implemented"
end