5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
# File 'lib/license_finder/package_utils/conan_info_parser.rb', line 5
def parse(info)
@lines = info.lines.map(&:chomp)
@state = :project_level @projects = [] @current_project = nil @current_vals = [] @current_key = nil while (line = @lines.shift)
next if line == ''
case @state
when :project_level
@current_project = {}
@current_project['name'] = line.strip
@state = :key_val
when :key_val
parse_key_val(line)
when :val_list
parse_val_list(line)
end
end
wrap_up
end
|