class CKEditor5::Rails::Semver

def initialize(version)

def initialize(version)
  @version = version
  validate!
end

def validate!

def validate!
  raise ArgumentError, 'version must be a string' unless version.is_a?(String)
  raise ArgumentError, 'invalid version format' unless version.match?(/\A\d+\.\d+\.\d+\z/)
end