class Avrolution::CompatibilityBreak
Constants
- NONE
- VALID_COMPATIBILITY_VALUES
- ValidationError
Attributes
after_compatibility[R]
fingerprint[R]
name[R]
with_compatibility[R]
Public Class Methods
new(name, fingerprint, with_compatibility = NONE, after_compatibility = nil, *extra)
click to toggle source
# File lib/avrolution/compatibility_break.rb, line 28 def initialize(name, fingerprint, with_compatibility = NONE, after_compatibility = nil, *extra) @name = name @fingerprint = fingerprint @with_compatibility = with_compatibility.upcase @after_compatibility = after_compatibility.try(:upcase) @extra = extra end
Public Instance Methods
key()
click to toggle source
# File lib/avrolution/compatibility_break.rb, line 36 def key [name, fingerprint] end
line()
click to toggle source
# File lib/avrolution/compatibility_break.rb, line 44 def line [name, fingerprint, with_compatibility, after_compatibility].compact.join(' ') end
register_options()
click to toggle source
# File lib/avrolution/compatibility_break.rb, line 48 def register_options { with_compatibility: with_compatibility }.tap do |options| options[:after_compatibility] = after_compatibility if after_compatibility.present? end end
validate!()
click to toggle source
# File lib/avrolution/compatibility_break.rb, line 40 def validate! raise ValidationError.new(errors.full_messages.join(', ')) unless valid? end