美文网首页
Ruby: Access Control

Ruby: Access Control

作者: bookinstock_ | 来源:发表于2017-04-20 08:54 被阅读1次

intro

  • public : accessible both outside and inside class
  • protected & private : only accessible inside class itself and its subclasses
  • protected : can be called with an explicit receiver
  • private : can only called by implicit self

相关文章

网友评论

      本文标题:Ruby: Access Control

      本文链接:https://www.haomeiwen.com/subject/vupkzttx.html