Sha256: 83e0a3d2d383a161f7d8406c8d1dc55169ac0ea571077da0a44f08e2b412bd0a

Contents?: true

Size: 451 Bytes

Versions: 16

Compression:

Stored size: 451 Bytes

Contents

# frozen_string_literal: true

require "delegate"

module Hanami
  module Console
    module Plugins
      # @api private
      # @since 2.0.0
      class SliceReaders < Module
        # @since 2.0.0
        # @api private
        def initialize(app)
          super()

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

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
hanami-cli-2.2.1 lib/hanami/console/plugins/slice_readers.rb
hanami-cli-2.2.0 lib/hanami/console/plugins/slice_readers.rb
hanami-cli-2.2.0.rc1 lib/hanami/console/plugins/slice_readers.rb
hanami-cli-2.2.0.beta2 lib/hanami/console/plugins/slice_readers.rb
hanami-cli-2.2.0.beta1 lib/hanami/console/plugins/slice_readers.rb
hanami-cli-2.1.1 lib/hanami/console/plugins/slice_readers.rb
hanami-cli-2.1.0 lib/hanami/console/plugins/slice_readers.rb
hanami-cli-2.1.0.rc3 lib/hanami/console/plugins/slice_readers.rb
hanami-cli-2.1.0.rc2 lib/hanami/console/plugins/slice_readers.rb
hanami-cli-2.1.0.rc1 lib/hanami/console/plugins/slice_readers.rb
hanami-cli-2.1.0.beta2 lib/hanami/console/plugins/slice_readers.rb
hanami-cli-2.1.0.beta1 lib/hanami/console/plugins/slice_readers.rb
hanami-cli-2.0.3 lib/hanami/console/plugins/slice_readers.rb
hanami-cli-2.0.2 lib/hanami/console/plugins/slice_readers.rb
hanami-cli-2.0.1 lib/hanami/console/plugins/slice_readers.rb
hanami-cli-2.0.0 lib/hanami/console/plugins/slice_readers.rb