Class: Canery::Backend
- Inherits:
-
Object
- Object
- Canery::Backend
- Defined in:
- lib/canery/backend.rb
Constant Summary collapse
- TABLE_PREFIX =
"canery_"
Instance Method Summary collapse
-
#call(command, *args) ⇒ Object
Only expose call method.
-
#initialize(connection_uri) ⇒ Backend
constructor
A new instance of Backend.
Constructor Details
#initialize(connection_uri) ⇒ Backend
Returns a new instance of Backend.
12 13 14 15 16 17 |
# File 'lib/canery/backend.rb', line 12 def initialize(connection_uri) raise ArgumentError, "connection_uri must be a String or nil" unless NilClass === connection_uri || String === connection_uri @connection = connection_uri.nil? ? Sequel.sqlite : Sequel.connect(connection_uri) @namespace_cache = {} end |
Instance Method Details
#call(command, *args) ⇒ Object
Only expose call method
20 21 22 |
# File 'lib/canery/backend.rb', line 20 def call(command, *args) self.send(command, *args) end |