def couchrest_inheritable_writer(*ivars)
      instance_writer = ivars.pop[:writer] if ivars.last.is_a?(Hash)
      ivars.each do |ivar|
        self.class_eval <<-RUBY, __FILE__, __LINE__ + 1
          def self.#{ivar}=(obj)
            @#{ivar} = obj
          end
        RUBY
        unless instance_writer == false
          self.class_eval <<-RUBY, __FILE__, __LINE__ + 1
            def #{ivar}=(obj) self.class.#{ivar} = obj end
          RUBY
        end

        self.send("#{ivar}=", yield) if block_given?
      end
    end
def couchrest_inheritable_writer(*ivars)
      instance_writer = ivars.pop[:writer] if ivars.last.is_a?(Hash)
      ivars.each do |ivar|
        self.class_eval <<-RUBY, __FILE__, __LINE__ + 1
          def self.#{ivar}=(obj)
            @#{ivar} = obj
          end
        RUBY
        unless instance_writer == false
          self.class_eval <<-RUBY, __FILE__, __LINE__ + 1
            def #{ivar}=(obj) self.class.#{ivar} = obj end
          RUBY
        end

        self.send("#{ivar}=", yield) if block_given?
      end
    end
Defines class-level inheritable attribute writer. Attributes are available to subclasses,
 each subclass has a copy of parent's attribute.

 @param *syms<Array[*#to_s, Hash{:instance_writer => Boolean}]> Array of attributes to
   define inheritable writer for.
 @option syms :instance_writer<Boolean> if true, instance-level inheritable attribute writer is defined.
 @return <Array[#to_s]> An Array of the attributes that were made into inheritable writers.

 @api public

 @todo We need a style for class_eval <<-HEREDOC. I'd like to make it
   class_eval(<<-RUBY, __FILE__, __LINE__), but we should codify it somewhere.