Project

General

Profile

Actions

Feature #10863

open

allow protected class methods to be callable from instance methods

Feature #10863: allow protected class methods to be callable from instance methods

Added by bughit (bug hit) over 10 years ago. Updated over 10 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

Updated by bughit (bug hit) over 10 years ago Actions #1

Does the proposed feature make sense?

Actions

Also available in: PDF Atom