lib/amazon_product_advertising_api/support.rb
# Pleasant syntax for Class attribute writers.
Pleasant syntax for Class attribute writers.
Pleasant syntax for Class attribute writers .
def cattr_writer(sym)
        class_eval(<<-EOS, __FILE__, __LINE__)
          unless defined? @@#{sym}                       # unless defined? @@hair_colors
            @@#{sym} = nil                               #   @@hair_colors = nil
          end                                            # end
                                                         #
          def self.#{sym}=(obj)                          # def self.hair_colors=(obj)
            @@#{sym} = obj                               #   @@hair_colors = obj
          end                                            # end
        EOS
      end
def cattr_writer ( sym ) class_eval ( <<-EOS , __FILE__ , __LINE__ ) 
          unless defined? @@ #{ sym }                        # unless defined? @@hair_colors
            @@ #{ sym }  = nil                               #   @@hair_colors = nil
          end                                            # end
                                                         #
          def self. #{ sym } =(obj)                          # def self.hair_colors=(obj)
            @@ #{ sym }  = obj                               #   @@hair_colors = obj
          end                                            # end
         EOS end
Pleasant syntax for Class attribute writers.
Pleasant syntax for Class attribute writers .
sym
<not_specific>