るりまサーチ

最速Rubyリファレンスマニュアル検索!
18件ヒット [1-18件を表示] (0.070秒)

別のキーワード

  1. _builtin puts
  2. csv puts
  3. stringio puts
  4. zlib puts
  5. xmp puts

ライブラリ

クラス

検索結果

OptionParser#separator(sep) -> () (18132.0)

サマリにオプションを区切るための文字列 sep を挿入します。 オプションにいくつかの種類がある場合に、サマリがわかりやすくなります。

...= "Usage: example.rb [options]"

opts.separator ""
opts.separator "Specific options:"

opts.on("-r", "--require LIBRARY") do |lib|
options.library << lib
end

opts.separator ""
opts.separator "Common options:"

opts.on_tail("-h", "--help", "Show this message") do
puts
opts
exit
end
//}...

Shell::Filter#each(rs = nil) -> () (13.0)

フィルタの一行ずつをblockに渡します。

...行ずつをblockに渡します。

@param rs レコードセパレーターを表す文字列を指定します。
nil ならば、Shell.record_separatorの値が使用されます。

使用例
require 'shell'
sh = Shell.new
sh.cat("/etc/passwd").each { |line|
puts
line
}...