種類
- 特異メソッド (253)
- インスタンスメソッド (121)
- モジュール関数 (88)
- 文書 (38)
- モジュール (11)
ライブラリ
クラス
- IO (187)
-
Net
:: SMTP (22) -
OpenSSL
:: Cipher :: IDEA (11) -
OpenSSL
:: Cipher :: RC5 (11) -
OpenSSL
:: Digest :: Digest (11) - OpenStruct (11)
- Pathname (33)
-
Resolv
:: DNS (22) - WIN32OLE (11)
-
Zlib
:: GzipFile (11) -
Zlib
:: GzipWriter (11)
モジュール
- Kernel (99)
-
OpenSSL
:: Buffering (22)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (11) - DRbProtocol (11)
-
NEWS for Ruby 2
. 7 . 0 (5) - exec (44)
- file (11)
- invoke (11)
- new (33)
- popen (154)
- print (11)
- printf (22)
- read (33)
- ready (11)
-
ruby 1
. 9 feature (11) - spawn (44)
- sysopen (11)
-
to
_ json (11) - クラス/メソッドの定義 (11)
検索結果
先頭5件
-
IO
. popen("-" , mode = "r" , opt={}) {|io| . . . } -> object (6118.0) -
第一引数に文字列 "-" が指定された時、fork(2) を 行い子プロセスの標準入出力との間にパイプラインを確立します。 親プロセスでは IO オブジェクトを返し、子プロセスでは nil を返します。
...プラインを確立します。
親プロセスでは IO オブジェクトを返し、子プロセスでは
nil を返します。
io = IO.popen("-", "r+")
if io # parent
io.puts "foo"
p io.gets # => "child output: foo\n"
io.close
else # child
s = gets......たパイ
プは自動的にクローズされます。
子プロセスでは nil を引数にブロックを実行し終了します。
p IO.popen("-", "r+") {|io|
if io # parent
io.puts "foo"
io.gets
else # child
s = gets
puts "child output: " + s
end......} という形式の Hash で渡します。
@param mode オープンする IO ポートのモードを指定します。mode の詳細は Kernel.#open 参照して下さい。
@param opt エンコーディングなどを設定するオプション引数(see IO.new)
@raise Errno::EXXX パイプ、... -
IO
. popen(env , "-" , mode = "r" , opt={}) -> IO (6118.0) -
第一引数に文字列 "-" が指定された時、fork(2) を 行い子プロセスの標準入出力との間にパイプラインを確立します。 親プロセスでは IO オブジェクトを返し、子プロセスでは nil を返します。
...プラインを確立します。
親プロセスでは IO オブジェクトを返し、子プロセスでは
nil を返します。
io = IO.popen("-", "r+")
if io # parent
io.puts "foo"
p io.gets # => "child output: foo\n"
io.close
else # child
s = gets......たパイ
プは自動的にクローズされます。
子プロセスでは nil を引数にブロックを実行し終了します。
p IO.popen("-", "r+") {|io|
if io # parent
io.puts "foo"
io.gets
else # child
s = gets
puts "child output: " + s
end......} という形式の Hash で渡します。
@param mode オープンする IO ポートのモードを指定します。mode の詳細は Kernel.#open 参照して下さい。
@param opt エンコーディングなどを設定するオプション引数(see IO.new)
@raise Errno::EXXX パイプ、... -
IO
. popen(env , "-" , mode = "r" , opt={}) {|io| . . . } -> object (6118.0) -
第一引数に文字列 "-" が指定された時、fork(2) を 行い子プロセスの標準入出力との間にパイプラインを確立します。 親プロセスでは IO オブジェクトを返し、子プロセスでは nil を返します。
...プラインを確立します。
親プロセスでは IO オブジェクトを返し、子プロセスでは
nil を返します。
io = IO.popen("-", "r+")
if io # parent
io.puts "foo"
p io.gets # => "child output: foo\n"
io.close
else # child
s = gets......たパイ
プは自動的にクローズされます。
子プロセスでは nil を引数にブロックを実行し終了します。
p IO.popen("-", "r+") {|io|
if io # parent
io.puts "foo"
io.gets
else # child
s = gets
puts "child output: " + s
end......} という形式の Hash で渡します。
@param mode オープンする IO ポートのモードを指定します。mode の詳細は Kernel.#open 参照して下さい。
@param opt エンコーディングなどを設定するオプション引数(see IO.new)
@raise Errno::EXXX パイプ、... -
OpenSSL
:: Cipher :: IDEA . new(*args) -> OpenSSL :: Cipher :: IDEA (3207.0) -
IDEA 暗号オブジェクトを生成します。
...IDEA 暗号オブジェクトを生成します。
@param args 暗号のパラメータ... -
OpenSSL
:: Cipher :: RC5 . new(*args) -> OpenSSL :: Cipher :: RC5 (3207.0) -
RC5 暗号オブジェクトを生成し、返します。
...RC5 暗号オブジェクトを生成し、返します。
@param args 暗号のパラメータ... -
OpenSSL
:: Digest :: Digest . new(*args) -> OpenSSL :: Digest :: Digest (3207.0) -
互換性のためのメソッドです。
...互換性のためのメソッドです。
OpenSSL::Digest.new で返されるオブジェクトと同じ働きをする
オブジェクトを返します。
@param args OpenSSL::Digest.new に渡すものと同じ引数を渡します... -
OpenSSL
:: Buffering # print(*args) -> nil (3129.0) -
args を順に出力します。
...args を順に出力します。
args の各要素を to_s で文字列に変換して
出力します。
IO#print とほぼ同様ですが、引数を省略した場合に $_ を出力する
機能はありません。
@param args 出力するオブジェクト... -
OpenSSL
:: Buffering # printf(format , *args) -> nil (3117.0) -
format に従い引数 args を文字列に変換して 出力します。
...format に従い引数 args を文字列に変換して
出力します。
IO#printf と同様です。
@param format 出力フォーマット文字列
@param arg 出力するオブジェクト
@see Kernel.#printf... -
OpenStruct
# to _ json(*args) -> String (3107.0) -
自身を JSON 形式の文字列に変換して返します。
...部的にはハッシュにデータをセットしてから JSON::Generator::GeneratorMethods::Hash#to_json を呼び出しています。
@param args 引数はそのまま JSON::Generator::GeneratorMethods::Hash#to_json に渡されます。
@see JSON::Generator::GeneratorMethods::Hash#to_json... -
Net
:: SMTP # ready(from _ addr , *to _ addrs) {|f| . . . . } -> () (3019.0) -
メール書き込みの準備をし、書き込み先のストリームオブジェクトを ブロックに渡します。ブロック終了後、書きこんだ結果が 送られます。
...ソッドを持っています。
* puts(str = '') strを出力して CR LFを出力
* print(str) strを出力
* printf(fmt, *args) sprintf(fmt,*args) を出力
* write(str):: str を出力して書き込んだバイト数を返す
* <<(str):: str を出力して......は送信先メールアドレスを文字列で渡します。
require 'net/smtp'
Net::SMTP.start('smtp.example.com', 25) {|smtp|
smtp.open_message_stream('from@example.com', 'to@example.net') {|f|
f.puts 'From: from@example.com'
f.puts 'To: to@example.net'
f.puts 'Subje...