I
Imobach González Sosa
Hi all,
I've got a little curiosity about defining methods. As far as I know (and
maybe I'm wrong) functions doesn't exist in Ruby... right? Ruby only have
methods.
However, I can do this:
<code>
#!/usr/bin/env ruby
def test
puts "This is a test"
end
test
</code>
If test is really a method... what class it belongs to? Or is it a function
and I've missed something?
Thank you.
PD: OK, I know, I'm more worried about conceptual point of view that I'd must
be ;-)
--
(o_.' Imobach González Sosa (e-mail address removed)
//\c{} (e-mail address removed) (e-mail address removed)
V__)_ (e-mail address removed) osoh en jabber.at y jabber.org
Usuario Linux #201634
Debian GNU/Linux `Sarge' con núcleo 2.4.24 sobre Intel Pentium 4
La buena y verdadera amistad no debe ser sospechosa en nada.
-- Miguel de Cervantes Saavedra. (1547-1616) Escritor español.
I've got a little curiosity about defining methods. As far as I know (and
maybe I'm wrong) functions doesn't exist in Ruby... right? Ruby only have
methods.
However, I can do this:
<code>
#!/usr/bin/env ruby
def test
puts "This is a test"
end
test
</code>
If test is really a method... what class it belongs to? Or is it a function
and I've missed something?
Thank you.
PD: OK, I know, I'm more worried about conceptual point of view that I'd must
be ;-)
--
(o_.' Imobach González Sosa (e-mail address removed)
//\c{} (e-mail address removed) (e-mail address removed)
V__)_ (e-mail address removed) osoh en jabber.at y jabber.org
Usuario Linux #201634
Debian GNU/Linux `Sarge' con núcleo 2.4.24 sobre Intel Pentium 4
La buena y verdadera amistad no debe ser sospechosa en nada.
-- Miguel de Cervantes Saavedra. (1547-1616) Escritor español.