lib/contrast/agent/patching/policy/policy_node.rb in contrast-agent-5.3.0 vs lib/contrast/agent/patching/policy/policy_node.rb in contrast-agent-6.0.0

- old
+ new

@@ -1,9 +1,10 @@ # Copyright (c) 2022 Contrast Security, Inc. See https://www.contrastsecurity.com/enduser-terms-0317a for more details. # frozen_string_literal: true require 'contrast/components/scope' +require 'contrast/utils/object_share' module Contrast module Agent module Patching module Policy @@ -12,11 +13,23 @@ # # @abstract class PolicyNode include Contrast::Components::Scope::InstanceMethods - attr_accessor :class_name, :instance_method, :method_name, :method_visibility - attr_reader :properties, :method_scope + # Name of the class in which the method is being invoked. + attr_accessor :class_name + # Check for instance method. + # + # @return true | false + attr_accessor :instance_method + # The symbol representation of the invoked method. + attr_accessor :method_name + # Visibility of the invoked method [Private, Public, Protected] + attr_accessor :method_visibility + # Properties parsed from our JSON policy. + attr_reader :properties + # Scope of the method parsed from our JSON policy. + attr_reader :method_scope def node_class raise NoMethodError, 'specify the type of the feature for which this node patches' end