Module: Cran::Adapter::ClassMethods

Defined in:
lib/cran/adapter.rb

Instance Method Summary collapse

Instance Method Details

#connectionObject

Raises:

  • (StandardError)


10
11
12
# File 'lib/cran/adapter.rb', line 10

def connection
  raise StandardError, "This method must be defined"
end

#listObject

Raises:

  • (StandardError)


23
24
25
# File 'lib/cran/adapter.rb', line 23

def list
  raise StandardError, "This method must be defined"
end

#pull(key) ⇒ Object



19
20
21
# File 'lib/cran/adapter.rb', line 19

def pull(key)
  connection[key]
end

#push(key, value) ⇒ Object



14
15
16
17
# File 'lib/cran/adapter.rb', line 14

def push(key, value)
  logger.debug "Store '#{key}'"
  connection[key] = value
end