module ActsAsPreferenced module Store # Base class for all stores for preferences class Base attr_reader :sections, :all_preferences, :translation_scope def initialize( klass, translation_scope = nil ) @klass = klass @translation_scope = translation_scope @sections = Hash.new { |h,k| h[k] = [] } @all_preferences = [] end def section( name, options = {} ) section = Section.new( self, name, options ) yield section end end end end