Project

General

Profile

Actions

Feature #10863

open

allow protected class methods to be callable from instance methods

Added by bughit (bug hit) almost 10 years ago. Updated over 9 years ago.

Status:
Open
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

Actions

Also available in: Atom PDF

Like0
Like0