lib/avrolution/compatibility_break.rb in avrolution-0.6.1 vs lib/avrolution/compatibility_break.rb in avrolution-0.7.0

- old
+ new

@@ -1,15 +1,24 @@ +# frozen_string_literal: true + require 'active_model' module Avrolution class CompatibilityBreak include ActiveModel::Validations ValidationError = Class.new(StandardError) - VALID_COMPATIBILITY_VALUES = %w(BACKWARD BACKWARD_TRANSITIVE FORWARD - FORWARD_TRANSITIVE FULL FULL_TRANSITIVE NONE).map(&:freeze).freeze - NONE = 'NONE'.freeze + VALID_COMPATIBILITY_VALUES = [ + 'BACKWARD', + 'BACKWARD_TRANSITIVE', + 'FORWARD', + 'FORWARD_TRANSITIVE', + 'FULL', + 'FULL_TRANSITIVE', + 'NONE' + ].freeze + NONE = 'NONE' attr_reader :name, :fingerprint, :with_compatibility, :after_compatibility validates_presence_of :name, :fingerprint validates_inclusion_of :with_compatibility, in: VALID_COMPATIBILITY_VALUES, allow_nil: true