Maybe the OP is going for something like this:

# This module can be mixed in to a class
# that has a :name accessor to give it
# 'extra' functionality
module Named
  def output_name
    puts "Name: #{self.name}"
  end

  def append_to_name(str)
    self.name << str
  end
end

class Person
  include Named
  attr_accessor :name
  def initialize(name)
    @name = name
  end
end

p = Person.new('Doug')

p.output_name
p.append_to_name(" Foo")
p.output_name

The mixin here is silly, but it might give the OP some ideas.  In the mixin
methods, you can refer to self, which will be an instance of whatever class
has mixed in the module.

-Doug S

On Sun, Jul 1, 2012 at 10:10 AM, Jan E. <lists / ruby-forum.com> wrote:

> Doug Jolley wrote in post #1066902:
> > When Jan said that I hadn't fully grasped the concept of object
> > orientation, she wasn't just whistling Dixie.
>
> I'm actually a "he". ;-)
>
>
>
> I know that my understanding has been expanded greatly.
> > This
> > dialog has been extremely enlightening for me.  I need to go play with
> > some code now.  I have a whole new prospective.  Thanks so much to all
> > who
> > contributed.
>
> You're welcome. And I can assure you that you're not the only one
> struggling with object orientation. This is really a difficult topic.
> Even experienced programmers often get it wrong.
>
> And it's even more difficult to find an appropriate structure for a
> program. This is something you need a lot of experience for, you cannot
> learn it by reading some books or so.
>
> So keep it up! :)
>
> --
> Posted via http://www.ruby-forum.com/.
>
>