[rspec-users] class << self considered harmful... really?

Mark Wilden mark at mwilden.com
Tue Nov 25 13:58:23 EST 2008


On Tue, Nov 25, 2008 at 10:27 AM, Wes Gamble <weyus at att.net> wrote:

>
> As far as private class methods, could you do
>
> private
>  def self.blah
>   ...
>  end
>
> to get private class methods, or does private not work on class methods in
> this way?
>

You would do

 def self.blah
   #...
 end
 private_class_method :blah

///ark
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20081125/305847e7/attachment.html>


More information about the rspec-users mailing list