77件ヒット
[1-77件を表示]
(0.198秒)
クラス
-
Fiddle
:: Function (11) - Pathname (33)
-
Zlib
:: GzipWriter (11)
モジュール
- Kernel (22)
キーワード
- call (11)
-
file
_ create (11) - open (22)
- printf (11)
検索結果
先頭5件
-
Kernel
# file(*args) { . . . } -> Rake :: FileTask (24715.0) -
ファイルタスクを定義します。
...ます。
@param args ファイル名と依存ファイル名を指定します。
例:
file "config.cfg" => ["config.template"] do
open("config.cfg", "w") do |outfile|
open("config.template") do |infile|
while line = infile.gets
outfile.puts line
end......end
end
end
@see Rake::Task.define_task... -
Kernel
# file _ create(*args) { . . . } -> Rake :: FileCreationTask (18703.0) -
ファイルを作成するタスクを定義します。
...ファイルを作成するタスクを定義します。
主に Kernel.#directory を定義するために使用します。... -
Zlib
:: GzipWriter # printf(format , *args) -> nil (12420.0) -
C 言語の printf と同じように、format に従い引数 を文字列に変換して、自身に出力します。
...C 言語の printf と同じように、format に従い引数
を文字列に変換して、自身に出力します。
@param format フォーマット文字列を指定します。print_format を参照してください。
@param args フォーマットされるオブジェクトを指定し......。
require 'zlib'
filename='hoge1.gz'
fw = File.open(filename, "w")
Zlib::GzipWriter.wrap(fw, Zlib::BEST_COMPRESSION){|gz|
gz.printf("\n%9s", "bar")
}
fr = File.open(filename)
Zlib::GzipReader.wrap(fr){|gz|
puts gz.read
}
#=> bar
@see IO#printf, Kernel.#printf... -
Pathname
# expand _ path(default _ dir = & # 39; . & # 39;) -> Pathname (9439.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... -
Fiddle
:: Function # call(*args) -> Integer|DL :: CPtr|nil (6420.0) -
関数を呼び出します。
...Fiddle::Function.new で指定した引数と返り値の型に基いて
Ruby のオブジェクトを適切に C のデータに変換して C の関数を呼び出し、
その返り値を Ruby のオブジェクトに変換して返します。
引数の変換は以下の通りです。
: void......まり任意のポインタ型)
nil ならば C の NULL に変換されます
Fiddle::Pointer は保持している C ポインタに変換されます。
文字列であればその先頭ポインタになります。
IO オブジェクトであれば FILE* が渡されます。
整数......なされます。
to_ptr を持っているならば、それを呼びだし Fiddle::Pointer に
変換したものを用います。
to_i を持っているならば、それを呼びだし結果の整数を
アドレスと見なします
: (unsigned) char/short/int/long/long long
R... -
Pathname
# open(mode = & # 39;r& # 39; , perm = 0666) {|file| . . . } -> object (3441.0) -
File.open(self.to_s, *args, &block) と同じです。
...File.open(self.to_s, *args, &block) と同じです。
@see File.open... -
Pathname
# open(mode = & # 39;r& # 39; , perm = 0666) -> File (3341.0) -
File.open(self.to_s, *args, &block) と同じです。
...File.open(self.to_s, *args, &block) と同じです。
@see File.open...