108件ヒット
[1-100件を表示]
(0.121秒)
ライブラリ
- ビルトイン (24)
- bigdecimal (12)
-
irb
/ ext / use-loader (12) - openssl (24)
- optparse (12)
- rake (12)
-
rake
/ loaders / makefile (12)
クラス
- BigDecimal (12)
-
IRB
:: Context (12) - LoadError (12)
- Module (12)
-
OpenSSL
:: Config (12) -
OpenSSL
:: X509 :: ExtensionFactory (12) - OptionParser (12)
-
Rake
:: Application (12) -
Rake
:: MakefileLoader (12)
キーワード
-
_ dump (12) -
add
_ loader (12) - autoload (12)
- config= (12)
- each (12)
- path (12)
-
use
_ loader= (12)
検索結果
先頭5件
-
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|
loader = Rake::MakefileLoader.new
loader.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 オブジェクト)...