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

Inherits:
Support::Command
  • Object
show all
Includes:
Support::Delegate
Defined in:
lib/convenient_service/rspec/matchers/classes/results/base/entities/printers/base/commands/generate_expected_step_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.



42
43
44
# File 'lib/convenient_service/rspec/matchers/classes/results/base/entities/printers/base/commands/generate_expected_step_part.rb', line 42

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.



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

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)


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

def call
  return "" unless chain.used_step?
  return "without step" if chain.step.nil?
  return "of step `#{chain.step}`" unless chain.used_step_index?
  return "of step `#{chain.step}`" if chain.step_index.nil?

  "of step `#{chain.step}` with index `#{chain.step_index}`"
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.



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

delegate :chain, to: :printer