Sha256: 64843b46232efeaadcf76ef5372a17d8c91ef00d01506d20480bc0fbfc6d3026

Contents?: true

Size: 957 Bytes

Versions: 2

Compression:

Stored size: 957 Bytes

Contents

# frozen_string_literal: true

module ConvenientService
  module Service
    module Plugins
      module HasAmazingPrintInspect
        module Concern
          include Support::Concern

          instance_methods do
            ##
            # @return [String]
            #
            def inspect
              metadata = {
                ConvenientService: {
                  entity: "Service",
                  name: inspect_values[:name]
                }
              }

              metadata.ai
            end

            ##
            # @return [Hash{Symbol => Object}]
            #
            # @internal
            #   NOTE: It is a coincidence that `HasInspect#inspect_values` has exactly the same implementation. There is NO intention to keep them in sync.
            #
            def inspect_values
              {name: Utils::Class.display_name(self.class)}
            end
          end
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
convenient_service-0.19.1 lib/convenient_service/service/plugins/has_amazing_print_inspect/concern.rb
convenient_service-0.19.0 lib/convenient_service/service/plugins/has_amazing_print_inspect/concern.rb