<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="http://feeds.vanhecke.info/~d/styles/rss2full.xsl" type="text/xsl" media="screen"?><?xml-stylesheet href="http://feeds.vanhecke.info/~d/styles/itemcontent.css" type="text/css" media="screen"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">

<channel>
	<title>Written along the rails</title>
	
	<link>http://ruby.vanhecke.info</link>
	<description>Just another WordPress weblog</description>
	<pubDate>Tue, 20 Mar 2007 17:40:31 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.5</generator>
	<language>en</language>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.vanhecke.info/RubyNotes" type="application/rss+xml" /><item>
		<title>Getting an object’s methods without the inherited methods</title>
		<link>http://ruby.vanhecke.info/2006/11/07/getting-an-objects-methods-without-the-inherited-methods/</link>
		<comments>http://ruby.vanhecke.info/2006/11/07/getting-an-objects-methods-without-the-inherited-methods/#comments</comments>
		<pubDate>Tue, 07 Nov 2006 20:49:27 +0000</pubDate>
		<dc:creator>Pascal Van Hecke</dc:creator>
		
		<category><![CDATA[Language]]></category>

		<guid isPermaLink="false">http://ruby.vanhecke.info/?p=5</guid>
		<description><![CDATA[test = SomeObject.new
test.methods - test.class.superclass.new.methods
Or is there a shorter, less convoluted way?
Update November 12th:  yes there seems to be&#8230;
puts String.instance_methods(false)
From the Ruby For Rails Book, page 254, paragraph 9.8.1&#8230;.
But: String.instance_methods(false).size = 83 , whereas (test.methods - test.class.superclass.new.methods).size = 102 (with test a string object).
&#62;&#62; puts (test.methods - test.class.superclass.new.methods - String.instance_methods(false)).sort
&#60;
&#60;=
&#62;
&#62;=
all?
any?
between?
collect
detect
each_with_index
entries
find
find_all
grep
inject
map
max
member?
min
partition
reject
select
sort
sort_by
zip
=&#62; nil
&#62;&#62; exit
The difference seems [...]]]></description>
			<content:encoded><![CDATA[<p><code>test = SomeObject.new<br />
test.methods - test.class.superclass.new.methods</code></p>
<p>Or is there a shorter, less convoluted way?</p>
<p><strong>Update November 12th</strong>:  yes there seems to be&#8230;</p>
<p><code>puts String.instance_methods(false)</code></p>
<p>From the <a href="http://www.amazon.com/gp/redirect.html?ie=UTF8&amp;location=http%3A%2F%2Fwww.amazon.com%2FRuby-Rails-Techniques-Developers%2Fdp%2F1932394699%2Fsr%3D1-1%2Fqid%3D1163340085%3Fie%3DUTF8%26s%3Dbooks&amp;tag=noteslinksand-20&amp;linkCode=ur2&amp;camp=1789&amp;creative=9325">Ruby For Rails</a><img src="http://www.assoc-amazon.com/e/ir?t=noteslinksand-20&amp;l=ur2&amp;o=1" style="border-style: none ! important; margin: 0px" border="0" height="1" width="1" /> Book, page 254, paragraph 9.8.1&#8230;.</p>
<p>But: String.instance_methods(false).size = 83 , whereas (test.methods - test.class.superclass.new.methods).size = 102 (with test a string object).</p>
<p><code>&gt;&gt; puts (test.methods - test.class.superclass.new.methods - String.instance_methods(false)).sort<br />
&lt;<br />
&lt;=<br />
&gt;<br />
&gt;=<br />
all?<br />
any?<br />
between?<br />
collect<br />
detect<br />
each_with_index<br />
entries<br />
find<br />
find_all<br />
grep<br />
inject<br />
map<br />
max<br />
member?<br />
min<br />
partition<br />
reject<br />
select<br />
sort<br />
sort_by<br />
zip<br />
=&gt; nil<br />
&gt;&gt; exit</code></p>
<p>The difference seems to be the methods of the mixed in modules&#8230;</p>
<img src="http://feeds.vanhecke.info/~r/RubyNotes/~4/177433661" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://ruby.vanhecke.info/2006/11/07/getting-an-objects-methods-without-the-inherited-methods/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Installing a Gem from a local file</title>
		<link>http://ruby.vanhecke.info/2006/10/08/installing-a-gem-from-a-local-file/</link>
		<comments>http://ruby.vanhecke.info/2006/10/08/installing-a-gem-from-a-local-file/#comments</comments>
		<pubDate>Sun, 08 Oct 2006 12:27:48 +0000</pubDate>
		<dc:creator>Pascal Van Hecke</dc:creator>
		
		<category><![CDATA[Infrastructure]]></category>

		<guid isPermaLink="false">http://ruby.vanhecke.info/?p=4</guid>
		<description><![CDATA[What if you want to install a Gem that you did not find on Rubyforge - one that was mailed to you or that you have downloaded?
Simple: just add the downloaded file name to the gem install command, instead of the name of the gem.  For example, installing the &#8220;simple-rss&#8221; extension would be:

with the [...]]]></description>
			<content:encoded><![CDATA[<p>What if you want to install a Gem that you did not find on Rubyforge - one that was mailed to you or that you have downloaded?</p>
<p>Simple: just add the downloaded file name to the gem install command, instead of the name of the gem.  For example, installing the &#8220;simple-rss&#8221; extension would be:</p>
<ul>
<li>with the path included if the file is not in the directory where your command line is:<br />
<code>gem install D:\downloads\ruby_gems\simple-rss-1.1.gem</code></li>
<li>or without, if you change directory in your command line to where the file is<br />
<code>gem install simple-rss-1.1.gem</code></li>
</ul>
<p>Instead of just:<br />
<code>gem install simple-rss</code></p>
<p>This might seem evident to most of you, but it took me a while to figure out as <a href="http://rubyforge.org/">rubyforge.org</a> was down today and I had to rely on <a href="http://rubyforge.iasi.roedu.net/gems/">this mirror</a>.</p>
<img src="http://feeds.vanhecke.info/~r/RubyNotes/~4/177433662" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://ruby.vanhecke.info/2006/10/08/installing-a-gem-from-a-local-file/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
