From: Pat Maddox Date: 2006-05-04T08:51:10+09:00 Subject: Re: Mixin Syntax for Newbies Hey Nathan, You should check out pp122-123 of Programming Ruby. http://www.rubycentral.com/book/tut_modules.html#UA will take you to the exact section that you should read. Pat On 5/2/06, Nathan Olberding wrote: > I'm trying to start using mixins and I'm having a little syntactual > trouble, if that's a word. > > Here's my test code: > > --------------- > module One > @one = "One!" > attr_reader :one > end > > class Two > include One > def initialize > puts @one > end > end > > this = Two.new > ---------------- > > I have tried several variations on this, but Two.one always seems to > come out as "nil". Is it possible to set it to "One!" by default? > > -- > Posted via http://www.ruby-forum.com/. > >