Class: DataCollector::RulesNg
- Inherits:
-
Object
- Object
- DataCollector::RulesNg
- Defined in:
- lib/data_collector/rules_ng.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(logger = Logger.new(STDOUT)) ⇒ RulesNg
constructor
A new instance of RulesNg.
- #run(rules, input_data, output_data, options = {}) ⇒ Object
Constructor Details
#initialize(logger = Logger.new(STDOUT)) ⇒ RulesNg
Returns a new instance of RulesNg.
5 6 7 |
# File 'lib/data_collector/rules_ng.rb', line 5 def initialize(logger = Logger.new(STDOUT)) @logger = logger end |
Instance Method Details
#run(rules, input_data, output_data, options = {}) ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/data_collector/rules_ng.rb', line 9 def run(rules, input_data, output_data, = {}) rules.each do |tag, rule| apply_rule(tag, rule, input_data, output_data, ) end output_data end |