Class: Hanami::Extensions::DB::SliceConfiguredRepo Private

Inherits:
Module
  • Object
show all
Defined in:
lib/hanami/extensions/db/repo.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Since:

  • 2.2.0

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(slice) ⇒ SliceConfiguredRepo

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of SliceConfiguredRepo.

Since:

  • 2.2.0



34
35
36
37
# File 'lib/hanami/extensions/db/repo.rb', line 34

def initialize(slice)
  super()
  @slice = slice
end

Instance Attribute Details

#sliceObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Since:

  • 2.2.0



32
33
34
# File 'lib/hanami/extensions/db/repo.rb', line 32

def slice
  @slice
end

Instance Method Details

#extended(repo_class) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Since:

  • 2.2.0



39
40
41
42
43
# File 'lib/hanami/extensions/db/repo.rb', line 39

def extended(repo_class)
  define_inherited
  configure_repo(repo_class)
  define_new
end

#inspectObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Since:

  • 2.2.0



45
46
47
# File 'lib/hanami/extensions/db/repo.rb', line 45

def inspect
  "#<#{self.class.name}[#{slice.name}]>"
end