# Protecting class "helper methods"?

**URL:** <https://www.ruby-forum.com/t/protecting-class-helper-methods/66075>\
**Category:** Ruby\
**Created:** [August 23, 2006, 5:06am UTC](https://www.ruby-forum.com/t/protecting-class-helper-methods/66075 "2006-08-23T05:06:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jay-levitt](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/a88e57/32.png) [@jay-levitt](https://www.ruby-forum.com/u/jay-levitt)\
**Post date:** [August 23, 2006, 5:06am UTC](https://www.ruby-forum.com/t/protecting-class-helper-methods/66075/1 "2006-08-23T05:06:29Z")

</div>

Start with:

class C  
def self.class\_callme  
internal\_helper  
end

def instance\_callme  
C.internal\_helper  
end

def self.internal\_helper  
puts “I’m not needed by the outside world.”  
end  
end

My first instinct was to make internal\_helper protected:

class \<\< self  
protected  
def internal\_helper  
puts “I’m not needed by the outside world.”  
end  
end

However, instance\_methods (such as instance\_callme) can’t call protected  
class methods.

Is there some other idiomatic Ruby way to, er, protect internal\_helper,  
or  
another way to call it from instance\_callme? Or do I just have to do it  
through lack of documentation with :nodoc:?

Jay L.
