# File lib/cgikit.rb, line 1411 def to_s to_s = '<select' if @attr_name then to_s << " name=\"#@attr_name\"" end if @attr_disabled then to_s << " disabled" end to_s << ">\n" if @attr_default then to_s << "<option value=\"\"" if @attr_selected == nil then to_s << " selected=\"selected\"" end to_s << ">#@attr_default</option>\n" end @attr_list.each { | item | to_s << "<option" if @attr_selected == item then to_s << " selected=\"selected\"" end # escape if @attr_escape then item = CKUtilities.escape_html( item ) end to_s << ">#{item}</option>\n" } to_s << '</select>' end