Class: Cuporter::Node::Types::FilterSummary
- Defined in:
- lib/cuporter/node/types.rb
Instance Method Summary collapse
Instance Method Details
#add(filter) ⇒ Object
43 44 45 46 47 |
# File 'lib/cuporter/node/types.rb', line 43 def add(filter) self << filter_node(:all, filter.all.join(' AND ')) unless filter.all.empty? self << filter_node(:any, filter.any.join(' OR ')) unless filter.any.empty? self << filter_node(:none, filter.none.join(', ')) unless filter.none.empty? end |
#filter_node(name, text) ⇒ Object
49 50 51 52 53 |
# File 'lib/cuporter/node/types.rb', line 49 def filter_node(name, text) fn = NodeBase.new(name.to_s, document) fn['tags'] = text fn end |