관리-도구
편집 파일: %5b%5d%3d-i.yaml
--- !ruby/object:RI::MethodDescription aliases: [] block_params: comment: - !ruby/struct:SM::Flow::P body: Sets an element, replacing any previous matching element. If no existing element is found ,the element is added. - !ruby/object:SM::Flow::LIST contents: - !ruby/struct:SM::Flow::LI label: "index:" body: Used to find a matching element to replace. See [](). - !ruby/struct:SM::Flow::LI label: "element:" body: The element to replace the existing element with the previous element - !ruby/struct:SM::Flow::LI label: "Returns:" body: nil if no previous element was found. type: :NOTE - !ruby/struct:SM::Flow::VERB body: " doc = Document.new '<a/>'\n doc.root.elements[10] = Element.new('b') #-> <a><b/></a>\n doc.root.elements[1] #-> <b/>\n doc.root.elements[1] = Element.new('c') #-> <a><c/></a>\n doc.root.elements['c'] = Element.new('d') #-> <a><d/></a>\n" full_name: REXML::Elements#[]= is_singleton: false name: "[]=" params: ( index, element ) visibility: public