# File lib/cgikit.rb, line 1307 def to_s to_s = '<select' if @attr_name then to_s << " name=\"#@attr_name\"" end if @attr_size then to_s << " size=\"#@attr_size\"" end if @attr_multiple then to_s << " multiple" 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 | if ( ( @attr_selected == item ) or ( @attr_selected.include?(item) ) ) then to_s << "<option selected=\"selected\">" else to_s << "<option>" end if @attr_escape == 'true' then item = CKMessage.escape( item ) end to_s << "#{item}</option>\n" } to_s << '</select>' end