Sha256: c93382be147f93f7a9e224db9c0da98c9cfe43a1e610b0d751d8e5c1528388f3

Contents?: true

Size: 1.82 KB

Versions: 6

Compression:

Stored size: 1.82 KB

Contents

# frozen_string_literal: true

module ConvenientService
  module RSpec
    module Matchers
      module Classes
        module Results
          class Base
            module Entities
              module Printers
                class Base
                  module Commands
                    class GenerateExpectedServicePart < Support::Command
                      include Support::Delegate

                      ##
                      # @api private
                      #
                      # @!attribute printer [r]
                      #   @return [ConvenientService::RSpec::Matchers::Classes::Results::Base::Entities::Printers::Base]
                      #
                      attr_reader :printer

                      ##
                      # @api private
                      #
                      # @return [ConvenientService::RSpec::Matchers::Classes::Results::Base::Entities::Chain]
                      #
                      delegate :chain, to: :printer

                      ##
                      # @api private
                      #
                      # @param printer [ConvenientService::RSpec::Matchers::Classes::Results::Base::Entities::Printers::Base]
                      # @return [void]
                      #
                      def initialize(printer:)
                        @printer = printer
                      end

                      ##
                      # @api private
                      #
                      # @return [String]
                      #
                      def call
                        return "" unless chain.used_service?

                        "of service `#{chain.service}`"
                      end
                    end
                  end
                end
              end
            end
          end
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
convenient_service-0.19.1 lib/convenient_service/rspec/matchers/classes/results/base/entities/printers/base/commands/generate_expected_service_part.rb
convenient_service-0.19.0 lib/convenient_service/rspec/matchers/classes/results/base/entities/printers/base/commands/generate_expected_service_part.rb
convenient_service-0.18.0 lib/convenient_service/rspec/matchers/classes/results/base/entities/printers/base/commands/generate_expected_service_part.rb
convenient_service-0.17.0 lib/convenient_service/rspec/matchers/classes/results/base/entities/printers/base/commands/generate_expected_service_part.rb
convenient_service-0.16.0 lib/convenient_service/rspec/matchers/classes/results/base/entities/printers/base/commands/generate_expected_service_part.rb
convenient_service-0.15.0 lib/convenient_service/rspec/matchers/classes/results/base/entities/printers/base/commands/generate_expected_service_part.rb