Sha256: e2d029bccc19cb1a7fea2b4222e8c61e6a724a9b05294293e64ef576d7c60a23
Contents?: true
Size: 570 Bytes
Versions: 24
Compression:
Stored size: 570 Bytes
Contents
require_relative "process_set" module Eye::Patch class GroupSet < Hash def initialize(application, processes) @application = application Array(processes).group_by{ |item| item[:group] }.each do |group_name, items| name = group_name || "__default__" parse_group(name, items) end end private def parse_group(name, processes) self[name] = @application.merge( name: name, application: @application[:name]) self[name][:processes] = ProcessSet.new(self[name], processes) end end end
Version data entries
24 entries across 24 versions & 1 rubygems