<?xml version="1.0" encoding="UTF-8"?>
<feed xml:lang="en-US" xmlns="http://www.w3.org/2005/Atom">
  <title>Ruby brothers - Simple Emptiness Comments</title>
  <id>tag:www.rubybrothers.ru,2009:/2007/3/31/simple-emptiness/comments</id>
  <generator version="0.7.3" uri="http://mephistoblog.com">Mephisto Noh-Varr</generator>
  <link href="http://www.rubybrothers.ru/2007/3/31/simple-emptiness/comments.xml" rel="self" type="application/atom+xml"/>
  <link href="/2007/3/31/simple-emptiness" rel="alternate" type="text/html"/>
  <updated>2007-04-09T09:51:54Z</updated>
  <entry xml:base="http://www.rubybrothers.ru">
    <author>
      <name>DEkart</name>
    </author>
    <id>tag:www.rubybrothers.ru,2007-03-31:175:189</id>
    <published>2007-04-09T09:51:54Z</published>
    <updated>2007-04-09T09:51:54Z</updated>
    <category term="Ruby on Rails"/>
    <category term="Tips &amp; Tricks"/>
    <link href="http://www.rubybrothers.ru/2007/3/31/simple-emptiness" rel="alternate" type="text/html"/>
    <title>Comment on 'Simple Emptiness' by DEkart</title>
<content type="html">&lt;p&gt;Ай какая полезная штука :) Шпашыба&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://www.rubybrothers.ru">
    <author>
      <name>&#1044;&#1084;&#1080;&#1090;&#1088;&#1080;&#1081;</name>
    </author>
    <id>tag:www.rubybrothers.ru,2007-03-31:175:183</id>
    <published>2007-04-02T10:57:10Z</published>
    <updated>2007-04-02T10:57:10Z</updated>
    <category term="Ruby on Rails"/>
    <category term="Tips &amp; Tricks"/>
    <link href="http://www.rubybrothers.ru/2007/3/31/simple-emptiness" rel="alternate" type="text/html"/>
    <title>Comment on 'Simple Emptiness' by &#1044;&#1084;&#1080;&#1090;&#1088;&#1080;&#1081;</title>
<content type="html">&lt;p&gt;:))&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://www.rubybrothers.ru">
    <author>
      <name>Des</name>
    </author>
    <id>tag:www.rubybrothers.ru,2007-03-31:175:182</id>
    <published>2007-04-02T07:31:20Z</published>
    <updated>2007-04-02T07:31:20Z</updated>
    <category term="Ruby on Rails"/>
    <category term="Tips &amp; Tricks"/>
    <link href="http://www.rubybrothers.ru/2007/3/31/simple-emptiness" rel="alternate" type="text/html"/>
    <title>Comment on 'Simple Emptiness' by Des</title>
<content type="html">&lt;p&gt;Понравилось :)&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://www.rubybrothers.ru">
    <author>
      <name>Julik</name>
    </author>
    <id>tag:www.rubybrothers.ru,2007-03-31:175:180</id>
    <published>2007-04-02T01:13:33Z</published>
    <updated>2007-04-02T01:13:33Z</updated>
    <category term="Ruby on Rails"/>
    <category term="Tips &amp; Tricks"/>
    <link href="http://www.rubybrothers.ru/2007/3/31/simple-emptiness" rel="alternate" type="text/html"/>
    <title>Comment on 'Simple Emptiness' by Julik</title>
<content type="html">&lt;p&gt;Так я не против, только зачем все остальное кроме Object если есть blank?&lt;/p&gt;


	&lt;p&gt;class Object
end&lt;/p&gt;


	&lt;pre&gt;&lt;code&gt;def |(oth)
  self.blank? ? oth : self
end&lt;/code&gt;&lt;/pre&gt;


	&lt;p&gt;и дело к стороне&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://www.rubybrothers.ru">
    <author>
      <name>&#1044;&#1084;&#1080;&#1090;&#1088;&#1080;&#1081;</name>
    </author>
    <id>tag:www.rubybrothers.ru,2007-03-31:175:179</id>
    <published>2007-04-01T21:41:12Z</published>
    <updated>2007-04-01T21:41:12Z</updated>
    <category term="Ruby on Rails"/>
    <category term="Tips &amp; Tricks"/>
    <link href="http://www.rubybrothers.ru/2007/3/31/simple-emptiness" rel="alternate" type="text/html"/>
    <title>Comment on 'Simple Emptiness' by &#1044;&#1084;&#1080;&#1090;&#1088;&#1080;&#1081;</title>
<content type="html">&lt;p&gt;Да я в курсе про blank?-то. Просто опять же,&lt;/p&gt;


	&lt;p&gt;something.blank? ? something : &#8220;default&#8221;&lt;/p&gt;


	&lt;p&gt;и&lt;/p&gt;


	&lt;p&gt;something | &#8220;default&#8221;&lt;/p&gt;


	&lt;p&gt;выглядят немного иначе. Плюс мне нравится ассоциация с рубишным ||. Я предложил syntax sugar, nothing more.&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://www.rubybrothers.ru">
    <author>
      <name>Julik</name>
    </author>
    <id>tag:www.rubybrothers.ru,2007-03-31:175:178</id>
    <published>2007-04-01T16:20:12Z</published>
    <updated>2007-04-01T16:20:12Z</updated>
    <category term="Ruby on Rails"/>
    <category term="Tips &amp; Tricks"/>
    <link href="http://www.rubybrothers.ru/2007/3/31/simple-emptiness" rel="alternate" type="text/html"/>
    <title>Comment on 'Simple Emptiness' by Julik</title>
<content type="html">&lt;p&gt;Простите, а Object#blank? для кого сотворили?&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://www.rubybrothers.ru">
    <author>
      <name>Mash</name>
    </author>
    <id>tag:www.rubybrothers.ru,2007-03-31:175:177</id>
    <published>2007-03-31T16:53:31Z</published>
    <updated>2007-03-31T16:53:31Z</updated>
    <category term="Ruby on Rails"/>
    <category term="Tips &amp; Tricks"/>
    <link href="http://www.rubybrothers.ru/2007/3/31/simple-emptiness" rel="alternate" type="text/html"/>
    <title>Comment on 'Simple Emptiness' by Mash</title>
<content type="html">&lt;p&gt;А, пардон, перечитал, не о том, видимо. :)&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://www.rubybrothers.ru">
    <author>
      <name>Mash</name>
    </author>
    <id>tag:www.rubybrothers.ru,2007-03-31:175:176</id>
    <published>2007-03-31T16:43:44Z</published>
    <updated>2007-03-31T16:43:44Z</updated>
    <category term="Ruby on Rails"/>
    <category term="Tips &amp; Tricks"/>
    <link href="http://www.rubybrothers.ru/2007/3/31/simple-emptiness" rel="alternate" type="text/html"/>
    <title>Comment on 'Simple Emptiness' by Mash</title>
<content type="html">&lt;p&gt;def some_method
    true
end
def redundant_method
    false
end
puts some_method() || redundant_method()&lt;/p&gt;</content>  </entry>
</feed>

