Sha256: a9ed5ab500f5e3ca8830d3a8a27283144cd17208ddfc55adc2598215957c9fab

Contents?: true

Size: 1.08 KB

Versions: 7

Compression:

Stored size: 1.08 KB

Contents

# frozen_string_literal: true

module ConvenientService
  module RSpec
    module Matchers
      module Custom
        module Results
          class Base
            module Commands
              class GenerateGotStepPart < Support::Command
                ##
                # @!attribute result [r]
                #   @return [ConvenientService::Service::Plugins::HasResult::Entities::Result]
                #
                attr_reader :result

                ##
                # @param result [ConvenientService::Service::Plugins::HasResult::Entities::Result]
                # @return [void]
                #
                def initialize(result:)
                  @result = result
                end

                ##
                # @return [String]
                #
                def call
                  if result.step.nil?
                    "without step"
                  else
                    "of step `#{result.step.service.klass}`"
                  end
                end
              end
            end
          end
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
convenient_service-0.12.0 lib/convenient_service/rspec/matchers/custom/results/base/commands/generate_got_step_part.rb
convenient_service-0.11.0 lib/convenient_service/rspec/matchers/custom/results/base/commands/generate_got_step_part.rb
convenient_service-0.10.1 lib/convenient_service/rspec/matchers/custom/results/base/commands/generate_got_step_part.rb
convenient_service-0.10.0 lib/convenient_service/rspec/matchers/custom/results/base/commands/generate_got_step_part.rb
convenient_service-0.9.0 lib/convenient_service/rspec/matchers/custom/results/base/commands/generate_got_step_part.rb
convenient_service-0.8.0 lib/convenient_service/rspec/matchers/custom/results/base/commands/generate_got_step_part.rb
convenient_service-0.7.0 lib/convenient_service/rspec/matchers/custom/results/base/commands/generate_got_step_part.rb