Inspectopedia Help

Invalid call to protected/private method

Reports invalid calls to protected/private methods.

You can call a protected method using an implicit or explicit receiver of the correct type.

You can call a private method only with an implicit receiver (except for self setter methods, for example, self.foo=).

You can call both protected and private methods only from the context of a method handler.

Inspection Details

Available in:

Qodana for Ruby 2023.3, RubyMine 2023.3

Plugin:

Ruby, 233.SNAPSHOT

Last modified: 13 July 2023