관리-도구
편집 파일: text%3d-i.yaml
--- !ruby/object:RI::MethodDescription aliases: [] block_params: comment: - !ruby/struct:SM::Flow::P body: Sets the first Text child of this object. See text() for a discussion about Text children. - !ruby/struct:SM::Flow::P body: If a Text child already exists, the child is replaced by this content. This means that Text content can be deleted by calling this method with a nil argument. In this case, the next Text child becomes the first Text child. In no case is the order of any siblings disturbed. - !ruby/object:SM::Flow::LIST contents: - !ruby/struct:SM::Flow::LI label: "text:" body: If a String, a new Text child is created and added to this Element as the first Text child. If Text, the text is set as the first Child element. If nil, then any existing first Text child is removed. - !ruby/struct:SM::Flow::LI label: "Returns:" body: this Element. type: :NOTE - !ruby/struct:SM::Flow::VERB body: " doc = Document.new '<a><b/></a>'\n doc.root.text = 'Sean' #-> '<a><b/>Sean</a>'\n doc.root.text = 'Elliott' #-> '<a><b/>Elliott</a>'\n doc.root.add_element 'c' #-> '<a><b/>Elliott<c/></a>'\n doc.root.text = 'Russell' #-> '<a><b/>Russell<c/></a>'\n doc.root.text = nil #-> '<a><b/><c/></a>'\n" full_name: REXML::Element#text= is_singleton: false name: text= params: ( text ) visibility: public