def_classed_element(name, class_name=nil, attribute_name=nil)
public
Hide source
# File lib/rss/maker/base.rb, line 95 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} if block_given? yield(@#{name}) else @#{name}.#{attribute_name} end end def #{name}=(new_value) @#{name}.#{attribute_name} = new_value end, __FILE__, __LINE__ + 1) else attr_reader name end end