def_elements_class_accessor(klass, name, full_name, full_plural_name, klass_name, plural_klass_name, recommended_attribute_name=nil) public

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# File lib/rss/maker/itunes.rb, line 60
      def def_elements_class_accessor(klass, name, full_name, full_plural_name,
                                      klass_name, plural_klass_name,
                                      recommended_attribute_name=nil)
        if recommended_attribute_name
          klass.def_classed_elements(full_name, recommended_attribute_name,
                                     plural_klass_name, full_plural_name)
        else
          klass.def_classed_element(full_plural_name, plural_klass_name)
        end
        klass.module_eval("def new_\#{full_name}(text=nil)\n\#{full_name} = @\#{full_plural_name}.new_\#{name}\n\#{full_name}.text = text\nif block_given?\nyield \#{full_name}\nelse\n\#{full_name}\nend\nend\n", __FILE__, __LINE__ + 1)
      end
Register or log in to add new notes.