るりまサーチ

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

別のキーワード

  1. openssl p
  2. openssl p=
  3. fileutils mkdir_p
  4. kernel p
  5. kernel $-p

ライブラリ

キーワード

検索結果

<< 1 2 > >>

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

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

...name を読み込んで各行をまとめたものに対して OptionParser#parse を行ないます。

パースが成功した場合に true を返します。
ファイルが存在しなかった場合に false を返します。

@param filename 各行をパースしたいファイルの名前...
....options/ に
プログラムのサフィックスを付けた '~/.options/コマンド名' というファイルをパースします。

//emlist[例][ruby]{
require
"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 # => {:a=>true, :b=>true}
//}...

Rake::MakefileLoader#load(filename) (21126.0)

与えられた Makefile をロードします。

...kefile をロードします。

@param filename 読み込む Makefile の名前を指定します。

//emlist[][ruby]{
# Rakefile での記載例とする
require
"rake/loaders/makefile"

task default: :test_rake_app

open "sample.mf", "w" do |io|
io << <<-'SAMPLE_MF'
# Comments
a: a1 a2 a3 a4
b...
...b7
a : a5 a6 a7
c: c1
d: d1 d2 \
e f : e1 f1
g\ 0: g1 g\ 2 g\ 3 g4
SAMPLE_MF
end

task :test_rake_app do |task|
load
er = Rake::MakefileLoader.new
load
er.load("sample.mf")
p
Rake::Task.task_defined?("a") # => true
p
Rake::Task.tasks[0] # => <Rake::FileTask a => [a1, a2, a3, a4, a5, a6, a7...

Rake::Application#add_loader(ext, loader) (9213.0)

与えられた拡張子で終わるファイル名のファイルをロードするためのローダーを 自身に追加します。

...@param ext 拡張子を指定します。

@param loader ローダーを指定します。

//emlist[例][ruby]{
require
"rake/loaders/makefile"

# Rakefile での記載例とする

task default: :test
task :test

makefile =<<-EOS
<< <<-'SAMPLE_MF'
# Comments
a: a1 a2 a3 a4
EOS
IO.write("sample.m...
...f", makefile)
Rake.application.add_loader("mf", Rake::MakefileLoader.new)
Rake.application.add_import("sample.mf")
Rake::Task.task_defined?("a") # => false
Rake.application.load_imports
Rake::Task.task_defined?("a") # => true
//}...

LoadError#path -> String | nil (9139.0)

Kernel.#require や Kernel.#load に失敗したパスを返します。

...Kernel.#require や Kernel.#load に失敗したパスを返します。

begin
require
'this/file/does/not/exist'
rescue LoadError => e
e.path # => 'this/file/does/not/exist'
end

パスが定まらない場合は nil を返します。...

IRB::Context#use_loader=(opt) (6265.0)

load または require 時に irb のファイル読み込み機能(irb_load、 irb_require)を使うかどうかを設定します。

...
load
または require 時に irb のファイル読み込み機能(irb_load
irb_require)を使うかどうかを設定します。

.irbrc ファイル中で IRB.conf[:USE_LOADER] を設定する事でも同様の事が行
えます。


デフォルト値は false です。

@see IRB::Context#...
...use_loader?...

絞り込み条件を変える

BigDecimal#_dump -> String (6141.0)

BigDecimal._load で復元可能な文字列を返します。 Marshal.#dump から呼び出されます。

...BigDecimal._load で復元可能な文字列を返します。
Marshal.#dump から呼び出されます。

//emlist[][ruby]{
require
'bigdecimal'
inf = BigDecimal('Infinity') # => Infinity
s = Marshal.dump(inf) # => "\x04\bu:\x0FBigDecimal\x0F9:Infinity"
Marshal.load(s) # => I...
...nfinity
//}

@see BigDecimal._load, Marshal.#dump, Marshal.#load...

Module#autoload(const_name, feature) -> nil (6141.0)

定数 const_name を最初に参照した時に feature を Kernel.#require するように設定します。

...照した時に feature を Kernel.#require するように設定します。

const_name が autoload 設定されていて、まだ定義されてない(ロードされていない)ときは、
autoload する対象を置き換えます。
const_name が(autoloadではなく)既に定義されて...
...せん。

@param const_name String または Symbol で指定します。
なお、const_name には、"::" 演算子を含めることはできません。
つまり、self の直下に定義された定数しか指定できません。

@param feature Kernel.#require と同様な方...
...tmp/foo.rb ---------
class Foo
class Bar
end
end
# ----- end of /tmp/foo.rb ----

class Foo
autoload :Bar, '/tmp/foo'
end
p
Foo::Bar #=> Foo::Bar
//}

以下のようにモジュールを明示的にレシーバとして呼び出すこともできます。

//emlist[例][ruby]{
# ------- /tmp/...

OpenSSL::Config#each {|section, key, value| ... } -> self (3019.0)

オブジェクトに含まれる全ての設定情報を順にブロックに渡し 呼び出します。

...を表す文字列、キーに
割り当てられた値の文字列、の3つです。

require
'openssl'
conf = OpenSSL::Config.load(OpenSSL::Config::DEFAULT_CONFIG_FILE)
conf.each{|section, key, value| p [section, key, value]}
# => ["req_distinguished_name", "countryName", "Country Name (2...

OpenSSL::X509::ExtensionFactory#config=(config) (3013.0)

自身にコンフィグファイルオブジェクトを設定します。

...自身にコンフィグファイルオブジェクトを設定します。


require
'openssl'
factory.config = OpenSSL::Config.load(OpenSSL::Config::DEFAULT_CONFIG_FILE)

@param config 設定ファイル(OpenSSL::Config オブジェクト)...
<< 1 2 > >>