From: Jason Lillywhite Date: 2008-09-06T08:00:12+09:00 Subject: Re: accessor methods for class methods Thanks. That makes sense. I want to do what is simplest, but it seems without cattr things would get worse. Here is what I'm trying to do: I have one rb file used for inputs: require 'rubygems' require 'activesupport' class Input cattr_reader :y def self.y @y = 2 end end **except I have lots of vars instead of just :y and I'm assigning them values here. Then I go to a new rb file and do this: require 'firstfile.rb' class NewClass def do_something Input.y * 2.3 end end new = NewClass.new p new.do_something **The fact that I need to say "Input.y" seems very bulky. Is there a better way to do this? Plus, if I get away from class vars, it will get bulkier. any ideas? -- Posted via http://www.ruby-forum.com/.