Sha256: fa613f2f027f2297823107c7d6b04cc10ac4c84b1bcbb63d572839157e444ffb
Contents?: true
Size: 596 Bytes
Versions: 8
Compression:
Stored size: 596 Bytes
Contents
# frozen_string_literal: true require_relative 'status_lines' module RubyGPG2 class StatusLine TYPE_REGEX = /^\[GNUPG:\] (.*?)(\s|$)/.freeze TYPES = { 'IMPORT_OK' => StatusLines::ImportOK, 'IMPORT_PROBLEM' => StatusLines::ImportProblem, 'IMPORTED' => StatusLines::Imported, 'KEY_CREATED' => StatusLines::KeyCreated, 'KEY_CONSIDERED' => StatusLines::KeyConsidered }.freeze def self.parse(line) TYPES .fetch( line.match(TYPE_REGEX)[1], StatusLines::Unimplemented ) .parse(line) end end end
Version data entries
8 entries across 8 versions & 1 rubygems