Sha256: 197ce09ba4eb99a3b4e90b15e72c0e7e540830e614f695ef011549271d448a31

Contents?: true

Size: 1015 Bytes

Versions: 7

Compression:

Stored size: 1015 Bytes

Contents

# frozen_string_literal: true

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

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

                      parts << "data_keys: #{unsafe_data.keys.inspect}" if unsafe_data.keys.any?
                      parts << "message: \"#{unsafe_message}\"" unless unsafe_message.empty?

                      "<#{parts.join(" ")}>"
                    end
                  end
                end
              end
            end
          end
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
convenient_service-0.19.1 lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_inspect/concern.rb
convenient_service-0.19.0 lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_inspect/concern.rb
convenient_service-0.18.0 lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_inspect/concern.rb
convenient_service-0.17.0 lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_inspect/concern.rb
convenient_service-0.16.0 lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_inspect/concern.rb
convenient_service-0.15.0 lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_inspect/concern.rb
convenient_service-0.14.0 lib/convenient_service/service/plugins/has_j_send_result/entities/result/plugins/has_inspect/concern.rb