From: Daniel Waite Date: 2008-05-02T08:07:11+09:00 Subject: DSL - class-level methods that affect instances I'm having a problem of design. I've tried a few configurations of class collaboration and responsibility, but they all end up feeling messy. I'm looking at these (either or, my original attempt was with a module, but attr_accessor *looks* like it does what I want): class C < Translator::Base translate 'this', :to => 'that' end class C include Translator translate 'this', :to => 'that' end With the expectation that... c = C.new c.translations Would yield a hash of the from and to values. I have no idea how to break the barrier between class and instance. :( Any ideas? -- Posted via http://www.ruby-forum.com/.