Sha256: 80f00be28d554255757958bbe938c0cdec8076986562e4c915853fc91097f8ed

Contents?: true

Size: 341 Bytes

Versions: 1

Compression:

Stored size: 341 Bytes

Contents

# frozen_string_literal: true

module SpaceCheckstyleReports
  class Severity
    VALUES = %i(ignore info warning error).freeze

    def initialize(base)
      @base = base&.to_sym
    end

    def <=(other)
      return if @base.nil?
      return true if other.nil?

      VALUES.index(@base) <= VALUES.index(other.to_sym)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
danger-space_checkstyle_reports-1.0.1 lib/space_checkstyle_reports/lib/severity.rb