Class: Kanrisuru::Core::Yum::Parser::List

Inherits:
Base
  • Object
show all
Defined in:
lib/kanrisuru/core/yum/parsers/list.rb

Class Method Summary collapse

Methods inherited from Base

extract_single_yum_line, parse_yum_line

Class Method Details

.parse(command) ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/kanrisuru/core/yum/parsers/list.rb', line 8

def self.parse(command)
  lines = command.to_a
  result = []
  lines.each do |line|
    item = parse_yum_line(line)
    next unless item

    result << item
  end

  result
end