Class: Hanami::Console::Plugins::SliceReaders Private

Inherits:
Module
  • Object
show all
Defined in:
lib/hanami/console/plugins/slice_readers.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.0.0

Instance Method Summary collapse

Constructor Details

#initialize(app) ⇒ SliceReaders

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 SliceReaders.

Since:

  • 2.0.0



13
14
15
16
17
18
19
20
21
# File 'lib/hanami/console/plugins/slice_readers.rb', line 13

def initialize(app)
  super()

  app.slices.each do |slice|
    define_method(slice.slice_name.to_sym) do
      slice
    end
  end
end