def_atom_persons(klass, name, maker_name, plural=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/atom.rb, line 9
      def def_atom_persons(klass, name, maker_name, plural=nil)
        plural ||= "#{name}s"
        klass_name = Utils.to_class_name(name)
        plural_klass_name = Utils.to_class_name(plural)

        klass.class_eval("class \#{plural_klass_name} < \#{plural_klass_name}Base\nclass \#{klass_name} < \#{klass_name}Base\ndef to_feed(feed, current)\n\#{name} = feed.class::\#{klass_name}.new\nset = setup_values(\#{name})\nunless set\nraise NotSetError.new(\#{maker_name.dump},\nnot_set_required_variables)\nend\ncurrent.\#{plural} << \#{name}\nset_parent(\#{name}, current)\nsetup_other_elements(\#{name})\nend\n\nprivate\ndef required_variable_names\n%w(name)\nend\nend\nend\n", __FILE__, __LINE__ + 1)
      end
Register or log in to add new notes.