Project

General

Profile

Feature #10863

allow protected class methods to be callable from instance methods

Added by bughit (bug hit) over 4 years ago. Updated over 4 years ago.

Status:
Open
Priority:
Normal
Assignee:
-
Target version:
-
[ruby-core:68160]

Description

class Bar
  class << self
    protected def foo_helper
    end
  end

  def foo
    self.class.foo_helper
  end
end

here, Bar::foo_helper is not intended as the api of the class, it's a helper for internal use so it should be possible to use it internally without making it public or resorting to send

History

#1

Updated by bughit (bug hit) over 4 years ago

Does the proposed feature make sense?

Also available in: Atom PDF