Module: ConvenientService::Service::Core Private

Includes:
Core, ConvenientService::Support::Concern
Included in:
ConvenientService::Service::Configs::Standard
Defined in:
lib/convenient_service/service/core.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 Core

entity?, entity_class?

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 service.

Examples:

Common usage.

class Service
  include ConvenientService::Standard::Config

  def result
    success
  end
end

puts Service.new
# <Service>
# => nil

Service.new.to_s
# => "<Service>"

Service.new.to_s(format: :inspect)
# => "<Service>"

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

Parameters:

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

Returns:

  • (String)

Since:

  • 1.0.0



51
52
53
# File 'lib/convenient_service/service/core.rb', line 51

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