method
def_classed_element
def_classed_element(name, class_name=nil, attribute_name=nil)
public
Hide source
# File lib/rss/maker/base.rb, line 92 def def_classed_element(name, class_name=nil, attribute_name=nil) def_classed_element_without_accessor(name, class_name) if attribute_name module_eval("def \#{name}\nif block_given?\nyield(@\#{name})\nelse\n@\#{name}.\#{attribute_name}\nend\nend\n\ndef \#{name}=(new_value)\n@\#{name}.\#{attribute_name} = new_value\nend\n", __FILE__, __LINE__ + 1) else attr_reader name end end