Class: DataCollector::RulesNg

Inherits:
Object
  • Object
show all
Defined in:
lib/data_collector/rules_ng.rb

Direct Known Subclasses

Rules

Instance Method Summary collapse

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, options = {})
  rules.each do |tag, rule|
    apply_rule(tag, rule, input_data, output_data, options)
  end

  output_data
end