るりまサーチ

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

別のキーワード

  1. _builtin end
  2. ripper end_seen?
  3. _builtin exclude_end?
  4. _builtin end_with?
  5. range end

ライブラリ

クラス

モジュール

キーワード

検索結果

<< < ... 5 6 7 >>

Net::POP3#delete_all -> () (13.0)

サーバ上のメールを全て消去します。

...きは消去する前に各メールを引数としてブロックを呼びだします。
メールは Net::POPMail のインスタンスとして渡されます。

使用例:

require 'net/pop'

n = 1
pop.delete_all do |m|
File.open("inbox/#{n}") {|f| f.write m.pop }
n += 1
end
...

Net::POP3#delete_all {|popmail| .... } -> () (13.0)

サーバ上のメールを全て消去します。

...きは消去する前に各メールを引数としてブロックを呼びだします。
メールは Net::POPMail のインスタンスとして渡されます。

使用例:

require 'net/pop'

n = 1
pop.delete_all do |m|
File.open("inbox/#{n}") {|f| f.write m.pop }
n += 1
end
...

OptionParser#load(filename = nil) -> bool (13.0)

指定された filename を読み込んで各行をまとめたものに対して OptionParser#parse を行ないます。

...uire "optparse"

IO.write("options.txt", %w(-a --b).join("\n"))
options = { a: false, b: false }
OptionParser.new do |opt|
opt.on('-a') { |v| options[:a] = v }
opt.on('--b') {|v| options[:b] = v }
opt.load("options.txt") # => true
opt.load("not_exist.txt") # => false
end


p options # => {:...

Rake::FileTask#needed? -> bool (13.0)

このタスクが必要である場合は真を返します。 そうでない場合は偽を返します。

...るファイルが古い場合に真を返します。

//emlist[][ruby]{
# Rakefile での記載例とする

task default: "test.txt"
file "test.txt" do |task|
Rake.application.options.build_all = false
task.needed? # => true
IO.write("test.txt", "test")
task.needed? # => false
end

//}...

Rake::TaskManager#synthesize_file_task(task_name) -> Rake::FileTask | nil (13.0)

与えられたタスク名をもとにファイルタスクを合成します。

...by]{
# Rakefile での記載例とする

task default: :test_rake_app

task :test_rake_app do |task|
task.application.synthesize_file_task("sample_file") # => nil
IO.write("sample_file", "")
task.application.synthesize_file_task("sample_file") # => <Rake::FileTask sample_file => []>
end

//}...

絞り込み条件を変える

<< < ... 5 6 7 >>