summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorzzak <zzak@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-01-31 21:12:49 +0000
committerzzak <zzak@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-01-31 21:12:49 +0000
commit09c3f84566f4f79c678e9d16417f4dfcf12abba8 (patch)
tree2468be28901bce6b858a387a4d2b7e595fe6d080 /lib
parente4ee9897d4fe57d9da074ba6cdf7fbfc2de3e848 (diff)
* lib/securerandom.rb: [DOC] Add note on require for examples
Based on a patch by @schneems [Fixes GH-518] [ci skip] https://github.com/ruby/ruby/pull/518 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44782 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/securerandom.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/securerandom.rb b/lib/securerandom.rb
index 4f2c35cabd..3ff5075023 100644
--- a/lib/securerandom.rb
+++ b/lib/securerandom.rb
@@ -8,6 +8,10 @@ end
# This library is an interface for secure random number generator which is
# suitable for generating session key in HTTP cookies, etc.
#
+# You can use this library in your application by requiring it:
+#
+# require 'securerandom'
+#
# It supports following secure random number generators.
#
# * openssl
@@ -18,6 +22,8 @@ end
#
# Hexadecimal string.
#
+# require 'securerandom'
+#
# p SecureRandom.hex(10) #=> "52750b30ffbc7de3b362"
# p SecureRandom.hex(10) #=> "92b15d6c8dc4beb5f559"
# p SecureRandom.hex(13) #=> "39b290146bea6ce975c37cfc23"