[前][次][番号順一覧][スレッド一覧]

ruby-changes:30324

From: zzak <ko1@a...>
Date: Mon, 5 Aug 2013 03:37:58 +0900 (JST)
Subject: [ruby-changes:30324] zzak:r42376 (trunk): * lib/rexml/attribute.rb: [DOC] Update example for #namespace

zzak	2013-08-05 03:37:46 +0900 (Mon, 05 Aug 2013)

  New Revision: 42376

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=42376

  Log:
    * lib/rexml/attribute.rb: [DOC] Update example for #namespace
      Patch by Ippei Obayashi [Bug #8685] [ruby-core:56173]

  Modified files:
    trunk/ChangeLog
    trunk/lib/rexml/attribute.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 42375)
+++ ChangeLog	(revision 42376)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Mon Aug  5 03:35:11 2013  Zachary Scott  <e@z...>
+
+	* lib/rexml/attribute.rb: [DOC] Update example for #namespace
+	  Patch by Ippei Obayashi [Bug #8685] [ruby-core:56173]
+
 Sun Aug  4 21:08:29 2013  Masaki Matsushita  <glass.saga@g...>
 
 	* array.c (rb_ary_zip): performance implement by using
Index: lib/rexml/attribute.rb
===================================================================
--- lib/rexml/attribute.rb	(revision 42375)
+++ lib/rexml/attribute.rb	(revision 42376)
@@ -80,8 +80,11 @@ module REXML https://github.com/ruby/ruby/blob/trunk/lib/rexml/attribute.rb#L80
     # Returns the namespace URL, if defined, or nil otherwise
     #
     #  e = Element.new("el")
-    #  e.add_attributes({"xmlns:ns", "http://url"})
-    #  e.namespace( "ns" )              # -> "http://url"
+    #  e.add_namespace("ns", "http://url")
+    #  e.add_attribute("ns:a", "b")
+    #  e.add_attribute("nsx:a", "c")
+    #  e.attribute("ns:a").namespace # => "http://url"
+    #  e.attribute("nsx:a").namespace # => nil
     def namespace arg=nil
       arg = prefix if arg.nil?
       @element.namespace arg

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]