Class: RubyGPG2::StatusLine
- Inherits:
-
Object
- Object
- RubyGPG2::StatusLine
- Defined in:
- lib/ruby_gpg2/status_line.rb
Constant Summary collapse
- TYPE_REGEX =
/^\[GNUPG:\] (.*?)(\s|$)/
- TYPES =
{ 'IMPORT_OK' => StatusLines::ImportOK, 'IMPORT_PROBLEM' => StatusLines::ImportProblem, 'IMPORTED' => StatusLines::Imported, 'KEY_CREATED' => StatusLines::KeyCreated, 'KEY_CONSIDERED' => StatusLines::KeyConsidered }.freeze
Class Method Summary collapse
Class Method Details
.parse(line) ⇒ Object
17 18 19 20 21 22 23 24 |
# File 'lib/ruby_gpg2/status_line.rb', line 17 def self.parse(line) TYPES .fetch( line.match(TYPE_REGEX)[1], StatusLines::Unimplemented ) .parse(line) end |