This is one place where rubocop and I strongly disagree.

Using self.something makes it more clear. Sometimes that is necessary.

Signed-off-by: Ryan Davis <zenspider@chef.io>
This commit is contained in:
Ryan Davis 2019-05-18 21:04:27 -07:00
parent 03a1fba565
commit 7e5c27410e

View file

@ -261,7 +261,7 @@ module FilterTable
current_raw_data.find_all do |row|
next unless row.key?(field)
self.send(method_ref, row[field], desired_value)
send(method_ref, row[field], desired_value)
end
end
@ -358,7 +358,7 @@ module FilterTable
resource_class.send(:define_method, method_name) do |*args, &block|
begin
# self here is the resource instance
filter_table_instance = table_class.new(self, self.send(raw_data_fetcher_method_name), ' with')
filter_table_instance = table_class.new(self, send(raw_data_fetcher_method_name), ' with')
filter_table_instance.send(method_name, *args, &block)
rescue Inspec::Exceptions::ResourceFailed, Inspec::Exceptions::ResourceSkipped => e
FilterTable::ExceptionCatcher.new(resource_class, e)