1829件ヒット
[1-100件を表示]
(0.171秒)
別のキーワード
ライブラリ
- ビルトイン (12)
- csv (144)
- erb (60)
- etc (12)
-
irb
/ cmd / load (12) - json (156)
-
json
/ add / struct (12) - logger (216)
-
net
/ http (60) - optparse (192)
- ostruct (14)
- pathname (555)
- rake (12)
-
rake
/ packagetask (36) - resolv (12)
-
rexml
/ document (288) - rubygems (12)
- socket (12)
- win32ole (12)
クラス
- Addrinfo (12)
- CSV (96)
-
CSV
:: Table (48) - ERB (60)
- IO (12)
-
IRB
:: ExtendCommand :: Require (12) -
JSON
:: Parser (24) -
JSON
:: State (72) - Logger (216)
- Module (12)
- OpenStruct (14)
- OptionParser (192)
- Pathname (555)
-
REXML
:: Attribute (24) -
REXML
:: Attributes (96) -
REXML
:: DocType (24) -
REXML
:: Element (132) -
REXML
:: Elements (12) -
Rake
:: DefaultLoader (12) -
Rake
:: PackageTask (36) -
Resolv
:: DNS :: Name (12) - Struct (12)
-
WIN32OLE
_ TYPE (12)
モジュール
キーワード
- + (12)
-
/ (11) - <=> (12)
- == (12)
- === (12)
- JSON (12)
- [] (24)
- []= (12)
- absolute? (12)
- add (24)
-
add
_ attributes (12) -
add
_ namespace (24) - ascend (24)
- atime (12)
- attribute (12)
-
attributes
_ of (12) - autoload (12)
- basename (12)
- binread (12)
- canonname (12)
- children (12)
- chown (12)
- cleanpath (12)
-
col
_ sep (12) - convert (36)
- ctime (12)
-
def
_ class (12) -
def
_ method (12) -
def
_ module (12) -
default
_ event _ sources (12) - delete (12)
-
delete
_ all (12) -
delete
_ if (24) -
delete
_ namespace (12) - descend (24)
- dirname (12)
- each (48)
-
each
_ attribute (12) -
each
_ capitalized _ name (12) -
each
_ child (24) -
each
_ element _ with _ attribute (12) -
each
_ element _ with _ text (12) -
each
_ entry (15) -
each
_ filename (12) -
each
_ header (12) -
each
_ key (12) -
each
_ line (24) -
each
_ name (12) - empty? (9)
- entries (12)
- eql? (12)
- error (24)
- execute (12)
-
external
_ id (12) - fatal (24)
- filename (12)
- filename= (12)
- fnmatch (12)
- formatter (12)
- formatter= (12)
- gem (12)
-
get
_ attribute (12) -
get
_ attribute _ ns (12) - glob (16)
-
header
_ convert (36) - info (24)
- j (12)
- jj (12)
- join (12)
- load (24)
- log (24)
- mountpoint? (12)
- name= (12)
- namespace (24)
- namespaces (24)
-
object
_ nl (12) -
object
_ nl= (12) - on (144)
-
package
_ dir= (12) - parent (12)
- parse (12)
- pathconf (12)
- progname (12)
- progname= (12)
-
program
_ name (12) -
program
_ name= (12) - puts (12)
- realdirpath (12)
- realpath (24)
- relative? (12)
-
relative
_ path _ from (12) - root (12)
- root? (12)
-
root
_ node (12) - source (12)
- space (12)
- space= (12)
-
space
_ before (12) -
space
_ before= (12) - split (12)
- sub (24)
-
sub
_ ext (12) -
subdomain
_ of? (12) -
to
_ h (14) -
to
_ json (36) -
to
_ s (12) -
to
_ string (12) - unknown (24)
- unlink (12)
- ver (12)
- warn (24)
検索結果
先頭5件
-
Rake
:: PackageTask # name -> String (21220.0) -
バージョン情報を含まないパッケージの名前を返します。
...バージョン情報を含まないパッケージの名前を返します。
//emlist[][ruby]{
# Rakefile での記載例とする
require 'rake/packagetask'
Rake::PackageTask.new("sample", "1.0.0") do |package_task|
package_task.name # => "sample"
end
//}... -
Pathname
# basename(suffix = "") -> Pathname (12391.0) -
Pathname.new(File.basename(self.to_s, suffix)) と同じです。
...thname.new(File.basename(self.to_s, suffix)) と同じです。
@param suffix サフィックスを文字列で与えます。'.*' という文字列を与えた場合、'*' はワイルドカードとして働き
'.' を含まない任意の文字列にマッチします。
//emlist......][ruby]{
require "pathname"
Pathname("ruby/ruby.c").basename #=> #<Pathname:"ruby.c">
Pathname("ruby/ruby.c").basename(".c") #=> #<Pathname:"ruby">
Pathname("ruby/ruby.c").basename(".*") #=> #<Pathname:"ruby">
Pathname("ruby/ruby.exe").basename(".*") #=> #<Pathname:"ruby">
Pathname(......"ruby/y.tab.c").basename(".*") #=> #<Pathname:"y.tab">
//}
@see File.basename... -
Net
:: HTTPHeader # each _ capitalized _ name {|name| . . . . } -> () (12321.0) -
保持しているヘッダ名を正規化 ('x-my-header' -> 'X-My-Header') して、ブロックに渡します。
...er' -> 'X-My-Header')
して、ブロックに渡します。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.each_capitalized_name { |key| puts key }
# => Accept-Encoding
# => Accept
# => User-Agent
//}... -
Pathname
# cleanpath(consider _ symlink = false) -> Pathname (12319.0) -
余計な "."、".." や "/" を取り除いた新しい Pathname オブジェクトを返します。
...余計な "."、".." や "/" を取り除いた新しい Pathname オブジェクトを返します。
cleanpath は、実際にファイルシステムを参照することなく、文字列操作
だけで処理を行います。
@param consider_symlink 真ならパス要素にシンボリック......す。
//emlist[例][ruby]{
require "pathname"
path = Pathname.new("//.././../")
path # => #<Pathname://.././../>
path.cleanpath # => #<Pathname:/>
require 'pathname'
Dir.rmdir("/tmp/foo") rescue nil
File.unlink("/tmp/bar/foo") rescue nil
Dir.rmdir("/tmp/bar") re......scue nil
Dir.mkdir("/tmp/foo")
Dir.mkdir("/tmp/bar")
File.symlink("../foo", "/tmp/bar/foo")
path = Pathname.new("bar/././//foo/../bar")
Dir.chdir("/tmp")
path.cleanpath # => #<Pathname:bar/bar>
path.cleanpath(true) # => #<Pathname:bar/foo/../bar>
//}... -
Pathname
# realpath -> Pathname (12319.0) -
余計な "."、".." や "/" を取り除いた新しい Pathname オブジェクトを返します。
...いた新しい Pathname オブジェクトを返します。
また、ファイルシステムをアクセスし、実際に存在するパスを返します。
シンボリックリンクも解決されます。
self が指すパスが存在しない場合は例外 Errno::ENOENT が発生しま......emlist[例][ruby]{
require 'pathname'
Dir.rmdir("/tmp/foo") rescue nil
File.unlink("/tmp/bar/foo") rescue nil
Dir.rmdir("/tmp/bar") rescue nil
Dir.mkdir("/tmp/foo")
Dir.mkdir("/tmp/bar")
File.symlink("../foo", "/tmp/bar/foo")
path = Pathname.new("bar/././//foo/../bar")
Dir.chdir("/tmp")......p path.realpath
# => ruby 1.8.0 (2003-10-10) [i586-linux]
# #<Pathname:/tmp/bar>
//}
@see Pathname#realdirpath, File.realpath... -
Pathname
# realpath(basedir = nil) -> Pathname (12319.0) -
余計な "."、".." や "/" を取り除いた新しい Pathname オブジェクトを返します。
...いた新しい Pathname オブジェクトを返します。
また、ファイルシステムをアクセスし、実際に存在するパスを返します。
シンボリックリンクも解決されます。
self が指すパスが存在しない場合は例外 Errno::ENOENT が発生しま......emlist[例][ruby]{
require 'pathname'
Dir.rmdir("/tmp/foo") rescue nil
File.unlink("/tmp/bar/foo") rescue nil
Dir.rmdir("/tmp/bar") rescue nil
Dir.mkdir("/tmp/foo")
Dir.mkdir("/tmp/bar")
File.symlink("../foo", "/tmp/bar/foo")
path = Pathname.new("bar/././//foo/../bar")
Dir.chdir("/tmp")......p path.realpath
# => ruby 1.8.0 (2003-10-10) [i586-linux]
# #<Pathname:/tmp/bar>
//}
@see Pathname#realdirpath, File.realpath... -
Pathname
# dirname -> Pathname (12313.0) -
Pathname.new(File.dirname(self.to_s)) と同じです。
...Pathname.new(File.dirname(self.to_s)) と同じです。
//emlist[例][ruby]{
require "pathname"
Pathname('/usr/bin/shutdown').dirname # => #<Pathname:/usr/bin>
//}
@see File.dirname... -
Pathname
# expand _ path(default _ dir = & # 39; . & # 39;) -> Pathname (12313.0) -
Pathname.new(File.expand_path(self.to_s, *args)) と同じです。
...Pathname.new(File.expand_path(self.to_s, *args)) と同じです。
@param default_dir self が相対パスであれば default_dir を基準に展開されます。
//emlist[例][ruby]{
require "pathname"
path = Pathname("testfile")
Pathname.pwd # => #<Pathname:/path/to>
path.expand_......path # => #<Pathname:/path/to/testfile>
path.expand_path("../") # => #<Pathname:/path/testfile>
//}
@see File.expand_path... -
Pathname
# realdirpath(basedir = nil) -> Pathname (12313.0) -
Pathname#realpath とほぼ同じで、最後のコンポーネントは実際に 存在しなくてもエラーになりません。
...athname#realpath とほぼ同じで、最後のコンポーネントは実際に
存在しなくてもエラーになりません。
@param basedir ベースディレクトリを指定します。省略するとカレントディレクトリになります。
//emlist[例][ruby]{
require "pathname......path = Pathname("/not_exist")
path.realdirpath # => #<Pathname:/not_exist>
path.realpath # => Errno::ENOENT
# 最後ではないコンポーネント(/not_exist_1)も存在しないのでエラーになる。
path = Pathname("/not_exist_1/not_exist_2")
path.realdirpath # => Errno::ENOENT
//......}
@see Pathname#realpath...