> I know it seems counter-intuitive, but the private keyword (at least, when 
> used as a keyword rather than a method) doesn’t have any impact on 
> class-level methods.
>

It depends where you put it:

  class A
  private
    def self.g1
    end
    class << self
      def g2
      end
    end
  end

  A.g1 # ok
  A.g2 # ok

  class B
    class << self
    private
      def f
      end
    end
  end

  B.f # fails

Thanks,

Nicholas

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
or Rails Oceania" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/rails-oceania.
For more options, visit https://groups.google.com/d/optout.

Reply via email to