This file is indexed.

/usr/lib/ruby/vendor_ruby/active_resource/observing.rb is in ruby-activeresource-3.2 3.2.16-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
module ActiveResource
  module Observing
    extend ActiveSupport::Concern
    include ActiveModel::Observing

    included do
      %w( create save update destroy ).each do |method|
        # def create_with_notifications(*args, &block)
        #   notify_observers(:before_create)
        #   if result = create_without_notifications(*args, &block)
        #     notify_observers(:after_create)
        #   end
        #   result
        # end
        # alias_method_chain(create, :notifications)
        class_eval(<<-EOS, __FILE__, __LINE__ + 1)
          def #{method}_with_notifications(*args, &block)
            notify_observers(:before_#{method})
            if result = #{method}_without_notifications(*args, &block)
              notify_observers(:after_#{method})
            end
            result
          end
        EOS
        alias_method_chain(method, :notifications)
      end
    end
  end
end