Sha256: e5552cc8110f3678c732870765668dcdc84e29d374dd3c6e2928d9a28aad20de
Contents?: true
Size: 538 Bytes
Versions: 8
Compression:
Stored size: 538 Bytes
Contents
module ForemanStatistics module Statistics class CountPuppetClasses < Base def initialize(options = {}) super(options) if id.empty? raise(ArgumentError, 'Must provide an :id or :count_by option') end end def calculate Puppetclass.authorized(:view_puppetclasses).map do |pc| count = pc.hosts_count next if count.zero? { :label => pc.to_label, :data => count } end.compact end end end end
Version data entries
8 entries across 8 versions & 1 rubygems