Permalink
Browse files

update

  • Loading branch information...
1 parent 62ea19c commit df2eb8d8ae1fa6b2702875309d6dbdb2fb5a88aa @qiaosu committed May 10, 2012
Showing with 10 additions and 6 deletions.
  1. +10 −6 _posts/2012-04-12-learning-ruby-step-by-step.html
@@ -148,13 +148,17 @@ <h2 id="sec-2">2. 语法学习Part-1</h2>
<p>Song为Jazz的父类。</p>
<p>super关键字:带参数的super指调用父类实例变量或方法,不带参数的话,将调用父类的同名方法,传递给当前类方法的参数会默认的传给父类。</p>
<p><strong>访问控制</strong></p>
- <p>public: 公共</p>
- <p>private: 私有</p>
- <p>protected: 受保护的,仅可以被定义的类或子类调用</p>
+ <ul>
+ <li>public: 公共</li>
+ <li>private: 私有</li>
+ <li>protected: 受保护的,仅可以被定义的类或子类调用</li>
+ </ul>
<p><strong>属性声明</strong></p>
- <p>attr_reader: 对应get</p>
- <p>attr_writer: 对应set</p>
- <p>attr_accessor: 既可读也可写</p>
+ <ul>
+ <li>attr_reader: 对应get</li>
+ <li>attr_writer: 对应set</li>
+ <li>attr_accessor: 既可读也可写</li>
+ </ul>
</div>
</li>
</ol>

0 comments on commit df2eb8d

Please sign in to comment.