Class: Eql::Adapters::Base

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

Overview

Base class contains basic adapter logic

Direct Known Subclasses

ActiveRecord

Defined Under Namespace

Modules: ContextHelpers

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(builder) ⇒ Base

Returns a new instance of Base.

Parameters:



30
31
32
# File 'lib/eql/adapters/base.rb', line 30

def initialize(builder)
  @builder = builder
end

Instance Attribute Details

#builderEql::Builder (readonly)

Returns:



14
15
16
# File 'lib/eql/adapters/base.rb', line 14

def builder
  @builder
end

Class Method Details

.match?(conn) ⇒ Boolean

Does adapter match connection?

Parameters:

  • conn (Object)

Returns:

  • (Boolean)

Raises:

  • (NotImplementedError)


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

def self.match?(conn)
  raise NotImplementedError
end

Instance Method Details

#executeObject

Execute adapter

Returns:

  • (Object)

    return exection results

Raises:

  • (NotImplementedError)


39
40
41
# File 'lib/eql/adapters/base.rb', line 39

def execute
  raise NotImplementedError
end

#extensionString

Get adapter’s template extensions

Returns:

  • (String)


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

def extension
  '.erb'
end