public private protected in Ruby 2016-10-05 Scan to get the URL for this page. public: 以实例方法的形式向外部公开该方法。 private: 在制定接收者的情况下不能调用该方法(智能使用缺省接收者的方式调用该方法,因此无法从实例外部访问) protected: 在同一个类中时可以将该方法作为实例方法调用