Sha256: ca2b1361e22b8e40f3c5011f735f22923fe9b2ed6712fb95b114b49c4e4370a2

Contents?: true

Size: 1.14 KB

Versions: 2

Compression:

Stored size: 1.14 KB

Contents

# frozen_string_literal: true

module ConvenientService
  module Service
    module Plugins
      module HasJSendResult
        module Entities
          class Result
            module Plugins
              module HasAwesomePrintInspect
                module Concern
                  include Support::Concern

                  instance_methods do
                    ##
                    # @return [String]
                    #
                    def inspect
                      metadata = {
                        ConvenientService: {
                          entity: "Result",
                          service: service.inspect_values[:name],
                          status: status.to_sym
                        }
                      }

                      metadata[:ConvenientService][:data_keys] = unsafe_data.keys if unsafe_data.keys.any?
                      metadata[:ConvenientService][:message] = unsafe_message.to_s unless unsafe_message.empty?

                      metadata.ai
                    end
                  end
                end
              end
            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_j_send_result/entities/result/plugins/has_awesome_print_inspect/concern.rb
convenient_service-0.19.0 lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_awesome_print_inspect/concern.rb