# Extending the Threads Class

**URL:** <https://www.ruby-forum.com/t/extending-the-threads-class/130755>\
**Category:** Ruby\
**Created:** [March 3, 2008, 3:23am UTC](https://www.ruby-forum.com/t/extending-the-threads-class/130755 "2008-03-03T03:23:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dsoftware](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/82dd89/32.png) [@dsoftware](https://www.ruby-forum.com/u/dsoftware)\
**Post date:** [March 3, 2008, 3:23am UTC](https://www.ruby-forum.com/t/extending-the-threads-class/130755/1 "2008-03-03T03:23:39Z")

</div>

Hello,

I was wondering if someone could help me with extending the Threads  
class. I am trying to do something like the following

```auto
class foo < Thread
  def run
   puts 'Here I am, over here! uuh, uuh me, pick me!'
   another_method()
  end
  def another_method()
    puts 'Something interesting'
  end
end

t = foo.new()
t.start()
```

The behavior I expect is foo.start() will call foo.run(). I have been  
trying to figure this out for a few hours, and I have not had any luck.  
I am mostly a Python programmer, and I am applying what I have learned  
in that language.

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![dsoftware](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/82dd89/32.png) [@dsoftware](https://www.ruby-forum.com/u/dsoftware)\
**Post date:** [March 3, 2008, 4:12am UTC](https://www.ruby-forum.com/t/extending-the-threads-class/130755/2 "2008-03-03T04:12:01Z")

</div>

Nevermind I think I found what I am looking for here:  
[http://www.ruby-forum.com/topic/126384#new](http://www.ruby-forum.com/topic/126384#new)
