Method: XinetdConf#filter
- Defined in:
- lib/resources/xinetd.rb
#filter(conditions = {}) ⇒ Object
77 78 79 80 81 82 83 84 85 86 |
# File 'lib/resources/xinetd.rb', line 77 def filter(conditions = {}) res = params.dup filters = '' conditions.each do |k, v| v = v.to_s if v.is_a? Integer filters += " #{k} = #{v.inspect}" res['services'] = filter_by(res['services'], k.to_s, v) end XinetdConf.new(@conf_path, params: res, filters: filters) end |