<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>richarddong (richarddong)</title>
    <link>https://ruby-china.org/richarddong</link>
    <description>不务正业的北大本科生</description>
    <language>en-us</language>
    <item>
      <title>有什么好办法能动态定义类吗？</title>
      <description>&lt;p&gt;除了 &lt;a href="http://stackoverflow.com/a/6583845" rel="nofollow" target="_blank"&gt;http://stackoverflow.com/a/6583845&lt;/a&gt; 这里的方法：&lt;/p&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="n"&gt;a_new_class&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="no"&gt;Class&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;new&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;Object&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt;
  &lt;span class="nb"&gt;attr_accessor&lt;/span&gt; &lt;span class="ss"&gt;:x&lt;/span&gt;

  &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;initialize&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="nb"&gt;print&lt;/span&gt; &lt;span class="c1"&gt;#{self.class} initialized with #{x}"&lt;/span&gt;
    &lt;span class="vi"&gt;@x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt;
  &lt;span class="k"&gt;end&lt;/span&gt;
&lt;span class="k"&gt;end&lt;/span&gt;

&lt;span class="no"&gt;SomeModule&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;const_set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"ClassName"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;a_new_class&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;c&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="no"&gt;ClassName&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;new&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;还有什么更好的方法咩？&lt;/p&gt;</description>
      <author>richarddong</author>
      <pubDate>Thu, 08 Aug 2013 18:10:25 +0800</pubDate>
      <link>https://ruby-china.org/topics/13169</link>
      <guid>https://ruby-china.org/topics/13169</guid>
    </item>
    <item>
      <title>Rails 4 将会有什么新特性？</title>
      <description>&lt;p&gt;RT&lt;/p&gt;

&lt;p&gt;我目前听说的是会抛弃 ruby 1.9.3 以下版本。  &lt;/p&gt;</description>
      <author>richarddong</author>
      <pubDate>Sat, 16 Jun 2012 22:03:20 +0800</pubDate>
      <link>https://ruby-china.org/topics/3851</link>
      <guid>https://ruby-china.org/topics/3851</guid>
    </item>
    <item>
      <title>如何测试 rails 网站在高并发下的性能？</title>
      <description>&lt;p&gt;有没有什么好的模拟的办法？&lt;/p&gt;

&lt;p&gt;谢谢~  &lt;/p&gt;</description>
      <author>richarddong</author>
      <pubDate>Wed, 02 May 2012 16:01:05 +0800</pubDate>
      <link>https://ruby-china.org/topics/3027</link>
      <guid>https://ruby-china.org/topics/3027</guid>
    </item>
    <item>
      <title>ruby-china 分页按钮过宽</title>
      <description>&lt;p&gt;&lt;img src="//l.ruby-china.com/photo/f70ebe9358e24b199461ddc10ce9668a.png" title="" alt=""&gt;&lt;/p&gt;

&lt;p&gt;分页的 inner-window 太大了&lt;/p&gt;

&lt;p&gt;Safari 5.1.5 on Mac 10.7.3  &lt;/p&gt;</description>
      <author>richarddong</author>
      <pubDate>Fri, 27 Apr 2012 13:21:26 +0800</pubDate>
      <link>https://ruby-china.org/topics/2930</link>
      <guid>https://ruby-china.org/topics/2930</guid>
    </item>
    <item>
      <title>Rails 3+ 默认使用 erubis ？</title>
      <description>&lt;p&gt;看见有人这么说，是这样吗？&lt;/p&gt;

&lt;p&gt;是不是在 Rails 3 上所有 &lt;code&gt;.erb&lt;/code&gt; 文件，都是默认用 erubis？&lt;/p&gt;

&lt;p&gt;因为好像 erubis 是相比传统 erb，eRuby 最快的吧？&lt;/p&gt;

&lt;p&gt;另外感觉 Haml，Slim 之类的除了代码看上去简洁一些以外，没有任何性能上的优势对吗？&lt;/p&gt;

&lt;p&gt;我们的网站正在考虑重构代码，下一步选择什么工具来做 template 比较好呢？&lt;/p&gt;

&lt;p&gt;谢谢~~  &lt;/p&gt;</description>
      <author>richarddong</author>
      <pubDate>Wed, 25 Apr 2012 16:27:16 +0800</pubDate>
      <link>https://ruby-china.org/topics/2882</link>
      <guid>https://ruby-china.org/topics/2882</guid>
    </item>
    <item>
      <title>MongoDB + Rails 有什么好的全文搜索的办法吗？</title>
      <description>&lt;p&gt;求大神指导！！&lt;/p&gt;

&lt;hr&gt;

&lt;p&gt;我的环境：&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Ruby 1.9.3p125&lt;/li&gt;
&lt;li&gt;Rails 3.1.3&lt;/li&gt;
&lt;li&gt;MongoDB 2.0.2&lt;/li&gt;
&lt;li&gt;Mongoid 2.4.7&lt;/li&gt;
&lt;li&gt;Unicorn + Nginx&lt;/li&gt;
&lt;/ul&gt;

&lt;hr&gt;

&lt;p&gt;听说过 solr, sphinx, sunspot, elasticsearch 等等。。&lt;/p&gt;

&lt;p&gt;他们的关系是什么？怎么用？&lt;/p&gt;

&lt;p&gt;而且好像上面都是要用到 Java 的？  &lt;/p&gt;</description>
      <author>richarddong</author>
      <pubDate>Wed, 18 Apr 2012 23:56:14 +0800</pubDate>
      <link>https://ruby-china.org/topics/2702</link>
      <guid>https://ruby-china.org/topics/2702</guid>
    </item>
  </channel>
</rss>
