method

append_features

Importance_0
Ruby latest stable (v2_5_5) - 0 notes - Class: RSS::Maker::Base

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v1_8_6_287) is shown here.

These similar methods exist in v2_5_5:

append_features(klass) public

No documentation

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

Hide source
# File lib/rss/maker/base.rb, line 10
      def self.append_features(klass)
        super

        klass.module_eval("\nOTHER_ELEMENTS = []\nNEED_INITIALIZE_VARIABLES = []\n\ndef self.inherited(subclass)\nsubclass.const_set(\"OTHER_ELEMENTS\", [])\nsubclass.const_set(\"NEED_INITIALIZE_VARIABLES\", [])\n\nsubclass.module_eval(<<-EOEOC, __FILE__, __LINE__)\ndef self.other_elements\nOTHER_ELEMENTS + super\nend\n\ndef self.need_initialize_variables\nNEED_INITIALIZE_VARIABLES + super\nend\nEOEOC\nend\n\ndef self.add_other_element(variable_name)\nOTHER_ELEMENTS << variable_name\nend\n\ndef self.other_elements\nOTHER_ELEMENTS\nend\n\ndef self.add_need_initialize_variable(variable_name, init_value=\"nil\")\nNEED_INITIALIZE_VARIABLES << [variable_name, init_value]\nend\n\ndef self.need_initialize_variables\nNEED_INITIALIZE_VARIABLES\nend\n\ndef self.def_array_element(name)\ninclude Enumerable\nextend Forwardable\n\ndef_delegators(\"@\\\#{name}\", :<<, :[], :[]=, :first, :last)\ndef_delegators(\"@\\\#{name}\", :push, :pop, :shift, :unshift)\ndef_delegators(\"@\\\#{name}\", :each, :size)\n\nadd_need_initialize_variable(name, \"[]\")\nend\n", __FILE__, __LINE__)
      end
Register or log in to add new notes.