On Mon, Dec 29, 2008 at 2:39 AM, Marius las <mzilenas / gmail.com> wrote:
> Hello:),
>
> 1)
> module Greeting
>  def say_hello
>    puts "Hello, my name is #{self.name}"
>  end
> end
>
> class Foo
>  attr_accessor :name
>  include Greeting
>
>  def initialize(name)
>    @name = name
>  end
>
> end
>
> 2)
> class Bar
>  extend Greeting
> end

I like the fact you can extend single instances, too...

f = Foo.new
f.extend MyModule

Todd