Class: RapidApi::ModelAdapters::Abstract

Inherits:
Object
  • Object
show all
Defined in:
lib/rapid_api/model_adapters/abstract.rb

Direct Known Subclasses

ActiveRecordAdapter

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(klass) ⇒ Abstract

Returns a new instance of Abstract.



7
8
9
# File 'lib/rapid_api/model_adapters/abstract.rb', line 7

def initialize(klass)
  @klass = klass
end

Instance Attribute Details

#klassObject

Returns the value of attribute klass.



5
6
7
# File 'lib/rapid_api/model_adapters/abstract.rb', line 5

def klass
  @klass
end

Instance Method Details

#create(_params, _scope = nil) ⇒ Object

Raises:

  • (NotImplementedError)


19
20
21
# File 'lib/rapid_api/model_adapters/abstract.rb', line 19

def create(_params, _scope=nil)
  raise NotImplementedError
end

#destroy(_id, _scope = nil) ⇒ Object

Raises:

  • (NotImplementedError)


27
28
29
# File 'lib/rapid_api/model_adapters/abstract.rb', line 27

def destroy(_id, _scope=nil)
  raise NotImplementedError
end

#find(_id, _scope = nil) ⇒ Object

Raises:

  • (NotImplementedError)


11
12
13
# File 'lib/rapid_api/model_adapters/abstract.rb', line 11

def find(_id, _scope=nil)
  raise NotImplementedError
end

#find_all(_params = nil, _scope = nil) ⇒ Object

Raises:

  • (NotImplementedError)


15
16
17
# File 'lib/rapid_api/model_adapters/abstract.rb', line 15

def find_all(_params=nil, _scope=nil)
  raise NotImplementedError
end

#update(_id, _params, _scope = nil) ⇒ Object

Raises:

  • (NotImplementedError)


23
24
25
# File 'lib/rapid_api/model_adapters/abstract.rb', line 23

def update(_id, _params, _scope=nil)
  raise NotImplementedError
end