class Bumbleworks::StorageAdapter
Attributes
auto_register[RW]
Public Class Methods
allow_history_storage?()
click to toggle source
# File lib/bumbleworks/storage_adapter.rb, line 37 def allow_history_storage? true end
auto_register?()
click to toggle source
# File lib/bumbleworks/storage_adapter.rb, line 7 def auto_register? auto_register.nil? || auto_register == true end
display_name()
click to toggle source
# File lib/bumbleworks/storage_adapter.rb, line 33 def display_name storage_class.name end
driver()
click to toggle source
# File lib/bumbleworks/storage_adapter.rb, line 11 def driver raise "Subclass responsibility" end
new_storage(storage, options = {})
click to toggle source
# File lib/bumbleworks/storage_adapter.rb, line 15 def new_storage(storage, options = {}) raise UnsupportedStorage unless use?(storage) wrap_storage_with_driver(storage, options) end
storage_class()
click to toggle source
# File lib/bumbleworks/storage_adapter.rb, line 29 def storage_class raise "Subclass responsibility" end
use?(storage)
click to toggle source
# File lib/bumbleworks/storage_adapter.rb, line 25 def use?(storage) storage.is_a? storage_class end
wrap_storage_with_driver(storage, options = {})
click to toggle source
# File lib/bumbleworks/storage_adapter.rb, line 20 def wrap_storage_with_driver(storage, options = {}) # the base method ignores options; use them in subclasses driver.new(storage) end