Sha256: fc27b1e2a35f8824f3a20a7165dce98942b423e3a45f25bbc02c8ce74a8c21e4

Contents?: true

Size: 957 Bytes

Versions: 8

Compression:

Stored size: 957 Bytes

Contents

# frozen_string_literal: true

module ConvenientService
  module Service
    module Plugins
      module HasAwesomePrintInspect
        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

8 entries across 8 versions & 1 rubygems

Version Path
convenient_service-0.19.1 lib/convenient_service/service/plugins/has_awesome_print_inspect/concern.rb
convenient_service-0.19.0 lib/convenient_service/service/plugins/has_awesome_print_inspect/concern.rb
convenient_service-0.18.0 lib/convenient_service/service/plugins/has_awesome_print_inspect/concern.rb
convenient_service-0.17.0 lib/convenient_service/service/plugins/has_awesome_print_inspect/concern.rb
convenient_service-0.16.0 lib/convenient_service/service/plugins/has_awesome_print_inspect/concern.rb
convenient_service-0.15.0 lib/convenient_service/service/plugins/has_awesome_print_inspect/concern.rb
convenient_service-0.14.0 lib/convenient_service/service/plugins/has_awesome_print_inspect/concern.rb
convenient_service-0.13.0 lib/convenient_service/service/plugins/has_awesome_print_inspect/concern.rb