Project

General

Profile

Actions

Feature #10863

open

allow protected class methods to be callable from instance methods

Added by bughit (bug hit) about 9 years ago. Updated almost 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 #1

Updated by bughit (bug hit) almost 9 years ago

Does the proposed feature make sense?

Actions

Also available in: Atom PDF

Like0
Like0