Class: ConvenientService::RSpec::Matchers::Classes::Results::Base::Entities::Printers::Base::Commands::GenerateGotServicePart

Inherits:
Support::Command
  • Object
show all
Includes:
Support::Delegate
Defined in:
lib/convenient_service/rspec/matchers/classes/results/base/entities/printers/base/commands/generate_got_service_part.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Support::Delegate::ClassMethodsForForwardable

#delegate

Methods inherited from Support::Command

[], call

Constructor Details

#initialize(printer:) ⇒ void

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



44
45
46
# File 'lib/convenient_service/rspec/matchers/classes/results/base/entities/printers/base/commands/generate_got_service_part.rb', line 44

def initialize(printer:)
  @printer = printer
end

Instance Attribute Details

#printerObject (readonly)

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



22
23
24
# File 'lib/convenient_service/rspec/matchers/classes/results/base/entities/printers/base/commands/generate_got_service_part.rb', line 22

def printer
  @printer
end

Instance Method Details

#callString

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

Returns:

  • (String)


53
54
55
56
57
# File 'lib/convenient_service/rspec/matchers/classes/results/base/entities/printers/base/commands/generate_got_service_part.rb', line 53

def call
  return "" unless chain.used_service?

  "of service `#{result.service.class}`"
end

#chainConvenientService::RSpec::Matchers::Classes::Results::Base::Entities::Chain

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



36
# File 'lib/convenient_service/rspec/matchers/classes/results/base/entities/printers/base/commands/generate_got_service_part.rb', line 36

delegate :chain, to: :printer

#resultConvenientService::Service::Plugins::HasJSendResult::Entities::Result

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



29
# File 'lib/convenient_service/rspec/matchers/classes/results/base/entities/printers/base/commands/generate_got_service_part.rb', line 29

delegate :result, to: :printer