Sha256: e2859df1b1ca158dfa0eecab0eba9d5efe56f95d358c110ce4a176ac23c7ccf3

Contents?: true

Size: 819 Bytes

Versions: 4

Compression:

Stored size: 819 Bytes

Contents

# Copyright (c) 2020 Contrast Security, Inc. See https://www.contrastsecurity.com/enduser-terms-0317a for more details.
# frozen_string_literal: true

module Contrast
  module Agent
    module Assess
      # This is just a helper method for doing things in
      # Assess. It'll hold the start and end indexes of a
      # range on which we will take an action.
      #
      # It is essentially a range, but start and stop can
      # be set after initialization.
      #
      # Note: Unlike ranges, it is assumed that the stop
      # value is exclusive, not inclusive. [start, end)
      class AdjustedSpan
        attr_accessor :stop
        attr_reader :start

        def initialize start = nil, stop = nil
          @start = start if start
          @stop = stop if stop
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
contrast-agent-3.12.2 lib/contrast/agent/assess/adjusted_span.rb
contrast-agent-3.12.1 lib/contrast/agent/assess/adjusted_span.rb
contrast-agent-3.12.0 lib/contrast/agent/assess/adjusted_span.rb
contrast-agent-3.11.0 lib/contrast/agent/assess/adjusted_span.rb