# File lib/foreman_maintain/scenario.rb, line 15 def initialize(filter) @filter_tags = filter[:tags] @filter_label = filter[:label] @steps = ForemanMaintain.available_checks(filter).map(&:ensure_instance) end
# File lib/foreman_maintain/scenario.rb, line 21 def description if @filter_label "check with label [#{dashize(@filter_label)}]" else "checks with tags #{tag_string(@filter_tags)}" end end
# File lib/foreman_maintain/scenario.rb, line 35 def dashize(string) string.to_s.tr('_', '-') end
# File lib/foreman_maintain/scenario.rb, line 31 def tag_string(tags) tags.map { |tag| dashize("[#{tag}]") }.join(' ') end