Module: ConvenientService::Service::Plugins::HasJSendResult::Entities::Result::Concern Private

Includes:
ConvenientService::Support::Concern
Included in:
ConvenientService::Service::Plugins::HasJSendResult::Entities::Result
Defined in:
lib/convenient_service/service/plugins/has_j_send_result/entities/result/concern.rb

Overview

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Since:

  • 1.0.0

Instance Method Summary collapse

Methods included from ConvenientService::Support::Concern

included

Instance Method Details

#to_s(format: :inspect) ⇒ String

Note:

Intended to be used for debugging purposes.

Returns string representation of result.

Examples:

Common usage.

class Service
  include ConvenientService::Standard::Config

  def result
    success
  end
end

puts Service.result
# <Service::Result status: :success>
# => nil

Service.result.to_s
# => "<Service::Result status: :success>"

Service.result.to_s(format: :inspect)
# => "<Service::Result status: :success>"

Service.result.to_s(format: :original)
# => "#<Service::Result:0x00005639cd363000>"

Parameters:

  • format (Symbol) (defaults to: :inspect)

Returns:

  • (String)

Since:

  • 1.0.0



55
56
57
# File 'lib/convenient_service/service/plugins/has_j_send_result/entities/result/concern.rb', line 55

def to_s(format: :inspect)
  (format == :inspect) ? inspect : super()
end