Class: Simpleadmin::Adapters::Base

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

Overview

Base class to provide a unified interface for each adapter

Since:

  • 1.0.0

Direct Known Subclasses

Postgres

Instance Method Summary collapse

Constructor Details

#initialize(database_credentials:) ⇒ Base

Returns a new instance of Base.

Since:

  • 1.0.0



11
12
13
# File 'lib/simpleadmin/adapters/base.rb', line 11

def initialize(database_credentials:)
  @database_credentials = database_credentials
end

Instance Method Details

#resources(*_args) ⇒ Object

Raises:

  • (NotImplementedError)

Since:

  • 1.0.0



23
24
25
# File 'lib/simpleadmin/adapters/base.rb', line 23

def resources(*_args)
  raise NotImplementedError, 'Please follow the unified interface, add method #resources'
end

#table_columns(*_args) ⇒ Object

Raises:

  • (NotImplementedError)

Since:

  • 1.0.0



19
20
21
# File 'lib/simpleadmin/adapters/base.rb', line 19

def table_columns(*_args)
  raise NotImplementedError, 'Please follow the unified interface, add method #table_columns'
end

#tablesObject

Raises:

  • (NotImplementedError)

Since:

  • 1.0.0



15
16
17
# File 'lib/simpleadmin/adapters/base.rb', line 15

def tables
  raise NotImplementedError, 'Please follow the unified interface, add method #tables'
end