method
install_date_element
install_date_element(tag_name, uri, occurs, name=nil, type=nil, disp_name=nil)
public
Hide source
# File lib/rss/rss.rb, line 213 def install_date_element(tag_name, uri, occurs, name=nil, type=nil, disp_name=nil) name ||= tag_name type ||= :w3cdtf disp_name ||= name self::ELEMENTS << name add_need_initialize_variable(name) install_model(tag_name, uri, occurs, name) # accessor convert_attr_reader name date_writer(name, type, disp_name) install_element(name) do |n, elem_name| "if @\#{n}\nrv = \"\\\#{indent}<\#{elem_name}>\"\nvalue = html_escape(@\#{n}.\#{type})\nif need_convert\nrv << convert(value)\nelse\nrv << value\nend\nrv << \"</\#{elem_name}>\"\nrv\nelse\n''\nend\n" end end