mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
tool/downloader.rb: Adjust example in documentation for Downloader.download.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47807 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
550406c016
commit
0fb67d59b2
2 changed files with 7 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
Mon Oct 6 10:15:15 2014 Martin Duerst <duerst@it.aoyama.ac.jp>
|
||||||
|
|
||||||
|
* tool/downloader.rb: Adjust example in documentation for
|
||||||
|
Downloader.download.
|
||||||
|
|
||||||
Mon Oct 6 10:07:07 2014 Martin Duerst <duerst@it.aoyama.ac.jp>
|
Mon Oct 6 10:07:07 2014 Martin Duerst <duerst@it.aoyama.ac.jp>
|
||||||
|
|
||||||
* lib/unicode_normalize: New folder for Unicode normalization
|
* lib/unicode_normalize: New folder for Unicode normalization
|
||||||
|
|
|
@ -50,7 +50,8 @@ class Downloader
|
||||||
# modified time.
|
# modified time.
|
||||||
#
|
#
|
||||||
# Example usage:
|
# Example usage:
|
||||||
# download :unicode, 'UnicodeData.txt', 'enc/unicode/data'
|
# download 'http://www.unicode.org/Public/UCD/latest/ucd/UnicodeData.txt',
|
||||||
|
# 'UnicodeData.txt', 'enc/unicode/data'
|
||||||
def self.download(url, name, dir = nil, ims = true)
|
def self.download(url, name, dir = nil, ims = true)
|
||||||
file = dir ? File.join(dir, name) : name
|
file = dir ? File.join(dir, name) : name
|
||||||
return true if ims.nil? and File.exist?(file)
|
return true if ims.nil? and File.exist?(file)
|
||||||
|
|
Loading…
Add table
Reference in a new issue