Sha256: fe229af58976bee4e6a4178af1f92ecf9e0aca59fc25aa8378410c1e07bf5fdb
Contents?: true
Size: 592 Bytes
Versions: 16
Compression:
Stored size: 592 Bytes
Contents
# frozen_string_literal: true require_relative 'status_line' module RubyGPG2 class StatusOutput def self.parse(lines) new(lines .strip .split("\n") .collect { |line| StatusLine.parse(line) }) end def initialize(lines) @lines = lines end def filter_by_type(type) StatusOutput.new(@lines.filter { |l| l.type == type }) end def first_line @lines.first end def ==(other) other.class == self.class && other.state == state end protected def state [@lines] end end end
Version data entries
16 entries across 16 versions & 1 rubygems