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

ruby-changes:30450

From: zzak <ko1@a...>
Date: Mon, 12 Aug 2013 12:49:58 +0900 (JST)
Subject: [ruby-changes:30450] zzak:r42529 (trunk): * lib/yaml.rb, lib/yaml/: [DOC] Document YAML::DBM#key and add

zzak	2013-08-12 12:49:50 +0900 (Mon, 12 Aug 2013)

  New Revision: 42529

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

  Log:
    * lib/yaml.rb, lib/yaml/: [DOC] Document YAML::DBM#key and add
      references to similar methods with more detail. This patch brings
      lib/yaml to 100% documentation coverage.

  Modified files:
    trunk/ChangeLog
    trunk/lib/yaml/dbm.rb
    trunk/lib/yaml.rb
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 42528)
+++ ChangeLog	(revision 42529)
@@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Mon Aug 12 12:46:31 2013  Zachary Scott  <e@z...>
+
+	* lib/yaml.rb, lib/yaml/: [DOC] Document YAML::DBM#key and add
+	  references to similar methods with more detail. This patch brings
+	  lib/yaml to 100% documentation coverage.
+
 Mon Aug 12 02:51:32 2013  NARUSE, Yui  <naruse@r...>
 
 	* ext/readline/readline.c (readline_s_set_input): on OS X with editline,
Index: lib/yaml.rb
===================================================================
--- lib/yaml.rb	(revision 42528)
+++ lib/yaml.rb	(revision 42529)
@@ -10,7 +10,7 @@ rescue LoadError https://github.com/ruby/ruby/blob/trunk/lib/yaml.rb#L10
   raise
 end
 
-YAML = Psych
+YAML = Psych # :nodoc:
 
 module Psych # :nodoc:
   # For compatibility, deprecated
Index: lib/yaml/dbm.rb
===================================================================
--- lib/yaml/dbm.rb	(revision 42528)
+++ lib/yaml/dbm.rb	(revision 42529)
@@ -15,11 +15,13 @@ module YAML https://github.com/ruby/ruby/blob/trunk/lib/yaml/dbm.rb#L15
 #
 # See the documentation for ::DBM and ::YAML for more information.
 class DBM < ::DBM
-    VERSION = "0.1"
+    VERSION = "0.1" # :nodoc:
 
     # Return value associated with +key+ from database.
     #
     # Returns +nil+ if there is no such +key+.
+    #
+    # See #fetch for more information.
     def []( key )
         fetch( key )
     end
@@ -30,6 +32,8 @@ class DBM < ::DBM https://github.com/ruby/ruby/blob/trunk/lib/yaml/dbm.rb#L32
     # Set +key+ to +value+ in database.
     #
     # +value+ will be converted to YAML before storage.
+    #
+    # See #store for more information.
     def []=( key, val )
         store( key, val )
     end
@@ -43,6 +47,8 @@ class DBM < ::DBM https://github.com/ruby/ruby/blob/trunk/lib/yaml/dbm.rb#L47
     # If there is no value for +key+ and no block is given, returns +ifnone+.
     #
     # Otherwise, calls block passing in the given +key+.
+    #
+    # See ::DBM#fetch for more information.
     def fetch( keystr, ifnone = nil )
         begin
             val = super( keystr )
@@ -67,6 +73,10 @@ class DBM < ::DBM https://github.com/ruby/ruby/blob/trunk/lib/yaml/dbm.rb#L73
         super( keystr.to_yaml )
     end
 
+    # :call-seq:
+    #   db.key(value) -> string
+    #
+    # Returns the key for the specified value.
     def key( keystr )
         invert[keystr]
     end

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

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