method
def_atom_text_construct
def_atom_text_construct(klass, name, maker_name, klass_name=nil, atom_klass_name=nil)
public
Hide source
# File lib/rss/maker/atom.rb, line 42 def def_atom_text_construct(klass, name, maker_name, klass_name=nil, atom_klass_name=nil) klass_name ||= Utils.to_class_name(name) atom_klass_name ||= Utils.to_class_name(name) klass.class_eval("class \#{klass_name} < \#{klass_name}Base\ninclude \#{self.name}\ndef to_feed(feed, current)\n\#{name} = current.class::\#{atom_klass_name}.new\nif setup_values(\#{name})\ncurrent.\#{name} = \#{name}\nset_parent(\#{name}, current)\nsetup_other_elements(feed)\nelsif variable_is_set?\nraise NotSetError.new(\#{maker_name.dump},\nnot_set_required_variables)\nend\nend\nend\n", __FILE__, __LINE__ + 1) end