262件ヒット
[1-100件を表示]
(0.033秒)
別のキーワード
ライブラリ
- ビルトイン (130)
- bigdecimal (12)
- drb (12)
-
irb
/ cmd / load (12) - optparse (12)
- rake (36)
-
rake
/ loaders / makefile (12) -
rake
/ testtask (12) - rubygems (12)
-
rubygems
/ version (12)
クラス
- BigDecimal (12)
- Class (12)
-
DRb
:: DRbUnknown (12) -
Gem
:: Version (12) -
IRB
:: ExtendCommand :: Load (12) - Module (24)
- Object (60)
- OptionParser (12)
-
Rake
:: Application (24) -
Rake
:: DefaultLoader (12) -
Rake
:: MakefileLoader (12) -
Rake
:: TestTask (12) - Random (24)
-
RubyVM
:: InstructionSequence (10)
モジュール
- Kernel (12)
キーワード
-
_ dump (24) -
_ load (12) -
add
_ loader (12) - autoload (12)
- autoload? (12)
- clone (12)
- dup (12)
- execute (12)
- gem (12)
- loader= (12)
-
marshal
_ dump (24) -
marshal
_ load (36) - reload (12)
-
to
_ binary (10)
検索結果
先頭5件
-
RubyVM
:: InstructionSequence # to _ binary(extra _ data = nil) -> String (23047.0) -
バイナリフォーマットでシリアライズされたiseqのデータを文字列として返します。 RubyVM::InstructionSequence.load_from_binary メソッドでバイナリデータに対応するiseqオブジェクトを作れます。
...列として返します。
RubyVM::InstructionSequence.load_from_binary メソッドでバイナリデータに対応するiseqオブジェクトを作れます。
引数の extra_data はバイナリデータと共に保存されます。
RubyVM::InstructionSequence.load_from_binary_extra_data......は他のマシンに移動できません。他のバージョンや他のアーキテクチャのRubyで作られたバイナリデータは使用できません。
//emlist[例][ruby]{
iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
iseq.to_binary("extra_data")
# ※表示の都合上......0\x00numE\x7F\x00\x00\x02\x00\x00\x00\x00
# \x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00+\xA0\x01\x00\x00\xAC\x01\x00
# \x00\xCA\x01\x00\x00\xD6\x01\x00\x00\xED\x01\x00\x00extra_data"
//}
@see RubyVM::InstructionSequence.load_from_binary
@see RubyVM::InstructionSequence.load_from_binary_extra_data... -
Rake
:: DefaultLoader # load(filename) (21114.0) -
与えられたファイルをロードします。
...与えられたファイルをロードします。
@param filename ロードするファイル名を指定します。
//emlist[][ruby]{
require 'rake'
loader = Rake::DefaultLoader.new
loader.load("path/to/Rakefile") # => true
//}... -
Rake
:: MakefileLoader # load(filename) (21114.0) -
与えられた Makefile をロードします。
...た Makefile をロードします。
@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 a......d: Comment
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,... -
OptionParser
# load(filename = nil) -> bool (18120.0) -
指定された filename を読み込んで各行をまとめたものに対して OptionParser#parse を行ないます。
...。
//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") # =>... -
Rake
:: Application # add _ loader(ext , loader) (6213.0) -
与えられた拡張子で終わるファイル名のファイルをロードするためのローダーを 自身に追加します。
...@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.mf", 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
//}... -
Object
# marshal _ load(obj) -> object (6166.0) -
Marshal.#load を制御するメソッドです。
...hal.#load を制御するメソッドです。
some のダンプ結果(Marshal.dump(some)) をロードする(Marshal.load(Marshal.dump(some)))に
は some がメソッド marshal_load を持っていなければなりません。
このとき、marshal_dump の返り値が marshal_load の......marshal_load 時の self は、生成されたばかり(Class#allocate されたばかり) の状態です。
marshal_dump/marshal_load の仕組みは Ruby 1.8.0 から導入されました。
これから書くプログラムでは _dump/_load ではなく
marshal_dump/marshal_load を使う... -
Module
# autoload(const _ name , feature) -> nil (6119.0) -
定数 const_name を最初に参照した時に feature を Kernel.#require するように設定します。
...nel.#require するように設定します。
const_name が autoload 設定されていて、まだ定義されてない(ロードされていない)ときは、
autoload する対象を置き換えます。
const_name が(autoloadではなく)既に定義されているときは何もしませ......。
@param feature Kernel.#require と同様な方法で autoload する対象を指定する。
//emlist[例][ruby]{
# ------- /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/foo.rb ---------
class Foo
class Bar
end
end
# ----- end of /tmp/foo.rb ----
class Foo
end
Foo.autoload :Bar, '/tmp/foo'
p Foo::Bar #=> Foo::Bar
//}
以下のように、autoload したライブラリがネストした定数... -
DRb
:: DRbUnknown # reload -> object (6117.0) -
保持しているマーシャリングされたオブジェクトをRubyのオブジェクトに 変換しようと試みます。
...保持しているマーシャリングされたオブジェクトをRubyのオブジェクトに
変換しようと試みます。
DRbUnknown オブジェクトを受け取った後に対応するクラスが定義された場合、
このメソッドでそのクラスのオブジェクトに変... -
Gem
:: Version # marshal _ load(array) -> nil (6114.0) -
ダンプされた情報をロードし、自身を破壊的に変更します。
...ダンプされた情報をロードし、自身を破壊的に変更します。
//emlist[][ruby]{
version = Gem::Version.new('')
version.marshal_load(["1.2.0a"])
p version # => #<Gem::Version "1.2.0a">
//}
@param array バージョン情報を含む配列を指定します。...