Class: RDFMapper::Adapters::Base

Inherits:
Object
  • Object
show all
Includes:
Logger
Defined in:
lib/lib/adapters/base.rb

Overview

Parent class for all adapters. Contains default constructor method and interface methods that each adapter should override.

Direct Known Subclasses

REST, Rails, SPARQL

Instance Method Summary collapse

Methods included from Logger

#debug, #fatal, #warn

Instance Method Details

#create(instance) ⇒ Object

Adapter implementation should override this method

Raises:

  • (NotImplementedError)


77
78
79
# File 'lib/lib/adapters/base.rb', line 77

def create(instance)
  raise NotImplementedError, 'Expected adapter to override `save`'
end

#load(query) ⇒ Object

Adapter implementation should override this method

Raises:

  • (NotImplementedError)


49
50
51
# File 'lib/lib/adapters/base.rb', line 49

def load(query)
  raise NotImplementedError, 'Expected adapter to override `load`'
end

#reload(instance) ⇒ Object

Adapter implementation should override this method

Raises:

  • (NotImplementedError)


63
64
65
# File 'lib/lib/adapters/base.rb', line 63

def reload(instance)
  raise NotImplementedError, 'Expected adapter to override `save`'
end

#save(instance) ⇒ Object

Adapter implementation should override this method

Raises:

  • (NotImplementedError)


56
57
58
# File 'lib/lib/adapters/base.rb', line 56

def save(instance)
  raise NotImplementedError, 'Expected adapter to override `save`'
end

#update(instance) ⇒ Object

Adapter implementation should override this method

Raises:

  • (NotImplementedError)


70
71
72
# File 'lib/lib/adapters/base.rb', line 70

def update(instance)
  raise NotImplementedError, 'Expected adapter to override `save`'
end