Sha256: 68586ad6b6ede5ec52b4155b9f60bfdf9fbca005c2edb88f0972ae1bb3515273

Contents?: true

Size: 957 Bytes

Versions: 14

Compression:

Stored size: 957 Bytes

Contents

# frozen_string_literal: true

module ConvenientService
  module Service
    module Plugins
      module RescuesResultUnhandledExceptions
        module Commands
          class FormatLine < Support::Command
            ##
            # @!attribute [r] line
            #   @return [String]
            #
            attr_reader :line

            ##
            # @param line [String]
            # @return [void]
            #
            def initialize(line:)
              @line = line
            end

            ##
            # @return [String]
            #
            # @note Exceptions formatting is inspired by RSpec. It has almost the same output (at least for RSpec 3).
            #
            # @example Line.
            #
            #   # /gem/lib/convenient_service/factories/services.rb:120:in `result'
            #
            def call
              "# #{line}"
            end
          end
        end
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
convenient_service-0.19.1 lib/convenient_service/service/plugins/rescues_result_unhandled_exceptions/commands/format_line.rb
convenient_service-0.19.0 lib/convenient_service/service/plugins/rescues_result_unhandled_exceptions/commands/format_line.rb
convenient_service-0.18.0 lib/convenient_service/service/plugins/rescues_result_unhandled_exceptions/commands/format_line.rb
convenient_service-0.17.0 lib/convenient_service/service/plugins/rescues_result_unhandled_exceptions/commands/format_line.rb
convenient_service-0.16.0 lib/convenient_service/service/plugins/rescues_result_unhandled_exceptions/commands/format_line.rb
convenient_service-0.15.0 lib/convenient_service/service/plugins/rescues_result_unhandled_exceptions/commands/format_line.rb
convenient_service-0.14.0 lib/convenient_service/service/plugins/rescues_result_unhandled_exceptions/commands/format_line.rb
convenient_service-0.13.0 lib/convenient_service/service/plugins/rescues_result_unhandled_exceptions/commands/format_line.rb
convenient_service-0.12.0 lib/convenient_service/service/plugins/rescues_result_unhandled_exceptions/commands/format_line.rb
convenient_service-0.11.0 lib/convenient_service/service/plugins/rescues_result_unhandled_exceptions/commands/format_line.rb
convenient_service-0.10.1 lib/convenient_service/service/plugins/rescues_result_unhandled_exceptions/commands/format_line.rb
convenient_service-0.10.0 lib/convenient_service/service/plugins/rescues_result_unhandled_exceptions/commands/format_line.rb
convenient_service-0.9.0 lib/convenient_service/service/plugins/rescues_result_unhandled_exceptions/commands/format_line.rb
convenient_service-0.8.0 lib/convenient_service/service/plugins/rescues_result_unhandled_exceptions/commands/format_line.rb