911件ヒット
[101-200件を表示]
(0.221秒)
別のキーワード
ライブラリ
クラス
-
ARGF
. class (96) - Array (4)
-
Encoding
:: UndefinedConversionError (12) - Enumerator (12)
- File (12)
- IO (48)
- Method (12)
-
Net
:: POPMail (108) - OptionParser (72)
-
Rake
:: Application (12) -
RubyVM
:: InstructionSequence (72) - SignalException (12)
- StringIO (12)
-
Thread
:: Backtrace :: Location (48) -
Thread
:: ConditionVariable (24) - TracePoint (7)
- UNIXSocket (12)
-
WIN32OLE
_ PARAM (12) -
WIN32OLE
_ TYPELIB (36) -
Zlib
:: GzipReader (180) -
Zlib
:: GzipWriter (72)
モジュール
- Kernel (24)
-
OpenSSL
:: Buffering (12)
キーワード
- << (12)
-
absolute
_ path (24) - all (36)
-
base
_ label (24) - broadcast (12)
- disasm (12)
- disassemble (12)
- each (72)
-
each
_ byte (24) -
each
_ line (72) - eof (12)
- eof? (12)
-
error
_ char (12) - flock (12)
- getc (12)
- gets (12)
- help (12)
- inspect (12)
-
instruction
_ sequence (7) - label (12)
- lineno (12)
- lineno= (12)
- mail (36)
-
major
_ version (12) -
minor
_ version (12) - next (12)
-
on
_ head (12) -
on
_ tail (12) - optional? (12)
- path (12)
- pid (12)
- pop (36)
- print (12)
- printf (12)
- putc (12)
- read (12)
- readchar (12)
- readline (12)
- readlines (12)
- rewind (12)
-
send
_ io (12) - separator (12)
- signal (12)
- signm (12)
-
source
_ location (12) -
to
_ csv (4) -
to
_ s (24) -
top
_ level (12) -
try
_ link (24) - ver (12)
- version (12)
- write (12)
検索結果
先頭5件
-
TracePoint
# instruction _ sequence -> RubyVM :: InstructionSequence (6207.0) -
script_compiledイベント発生時にコンパイルされた RubyVM::InstructionSequenceインスタンスを返します。
...ンパイルされた
RubyVM::InstructionSequenceインスタンスを返します。
//emlist[例][ruby]{
TracePoint.new(:script_compiled) do |tp|
p tp.instruction_sequence # => <RubyVM::InstructionSequence:block in <main>@(eval):1>
end.enable do
eval("puts 'hello'")
end
//}
@raise RuntimeErr... -
Method
# source _ location -> [String , Integer] | nil (6107.0) -
ソースコードのファイル名と行番号を配列で返します。
...@see Proc#source_location
//emlist[例][ruby]{
# ------- /tmp/foo.rb ---------
class Foo
def foo; end
end
# ----- end of /tmp/foo.rb ----
require '/tmp/foo'
m = Foo.new.method(:foo) # => #<Method: Foo#foo>
m.source_location # => ["/tmp/foo.rb", 2]
method(:puts).source_location # => nil
//}... -
WIN32OLE
_ PARAM # optional? -> bool (6107.0) -
パラメータがオプションかどうかを取得します。
...メータがオプション(省略可能)であれば真を返します。
tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbook')
method = WIN32OLE_METHOD.new(tobj, 'SaveAs')
param1 = method.params[0]
puts "#{param1.name} #{param1.optional?}" # => Filename true... -
WIN32OLE
_ TYPELIB # major _ version -> Integer (6107.0) -
TypeLibのメジャーバージョン番号を取得します。
...取得します。
@return TypeLibのメジャーバージョン番号を整数で返します。
@raise WIN32OLERuntimeError TypeLibの属性が読み取れない場合に通知します。
tlib = WIN32OLE_TYPELIB.new('Microsoft Excel 14.0 Object Library')
puts tlib.major_version # => 1... -
WIN32OLE
_ TYPELIB # minor _ version -> Integer (6107.0) -
TypeLibのマイナーバージョン番号を取得します。
...取得します。
@return TypeLibのマイナーバージョン番号を整数で返します。
@raise WIN32OLERuntimeError TypeLibの属性が読み取れない場合に通知します。
tlib = WIN32OLE_TYPELIB.new('Microsoft Excel 14.0 Object Library')
puts tlib.minor_version # => 7... -
WIN32OLE
_ TYPELIB # version -> Float (6107.0) -
TypeLibのバージョン番号を取得します。
...号、小数点
数部にマイナーバージョン番号を設定したFloatで返します。
@raise WIN32OLERuntimeError TypeLibの属性が読み取れない場合に通知します。
tlib = WIN32OLE_TYPELIB.new('Microsoft Excel 14.0 Object Library')
puts tlib.version # => 1.7... -
OptionParser
# on _ tail(*arg , &block) -> self (3019.0) -
オプションを取り扱うためのブロックを自身の持つリストの最後に登録します。
...後に登録します。
--version や --help の説明をサマリの最後に表示したい時に便利です。
@param arg OptionParser#on と同様です。
@param block OptionParser#on と同様です。
//emlist[例][ruby]{
require "optparse"
opts = OptionParser.new do |opts|
opts.on_h......d
puts opts.help
# => Usage: test [options]
# -i, --init
# -u, --update
# -h, --help
//}
//emlist[例][ruby]{
require "optparse"
opts = OptionParser.new
opts.on_tail("-h", "--help", "Show this message") do
puts opts
exit
end
opts.on_tail("--version", "Show version") do
puts Optio......nParser::Version.join('.')
exit
end
//}
@see OptionParser#on, OptionParser#on_head... -
RubyVM
:: InstructionSequence # base _ label -> String (3013.0) -
self が表す命令シーケンスの基本ラベルを返します。
...iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
# => <RubyVM::InstructionSequence:<compiled>@<compiled>>
iseq.base_label
# => "<compiled>"
例2: RubyVM::InstructionSequence.compile_file を使用した場合
# /tmp/method.rb
def hello
puts "hello, world"
end
# irb......> iseq = RubyVM::InstructionSequence.compile_file('/tmp/method.rb')
> iseq.base_label # => "<main>"
例3:
# /tmp/method2.rb
def hello
puts "hello, world"
end
RubyVM::InstructionSequence.of(method(:hello)).base_label
# => "hello"
@see RubyVM::InstructionSequence#label... -
RubyVM
:: InstructionSequence # label -> String (3013.0) -
self が表す命令シーケンスのラベルを返します。通常、メソッド名、クラス名、 モジュール名などで構成されます。
...ctionSequence.compile('num = 1 + 2')
# => <RubyVM::InstructionSequence:<compiled>@<compiled>>
iseq.label
# => "<compiled>"
例2: RubyVM::InstructionSequence.compile_file を使用した場合
# /tmp/method.rb
def hello
puts "hello, world"
end
# irb
> iseq = RubyVM::Instruction......Sequence.compile_file('/tmp/method.rb')
> iseq.label # => "<main>"
例3:
# /tmp/method2.rb
def hello
puts "hello, world"
end
RubyVM::InstructionSequence.of(method(:hello)).label
# => "hello"
@see RubyVM::InstructionSequence#base_label... -
Thread
:: ConditionVariable # broadcast -> self (3013.0) -
状態変数を待っているスレッドをすべて再開します。再開された スレッドは Thread::ConditionVariable#wait で指定した mutex のロックを試みます。
...ッドは Thread::ConditionVariable#wait
で指定した mutex のロックを試みます。
@return 常に self を返します。
//emlist[例][ruby]{
mutex = Mutex.new
cv = ConditionVariable.new
flg = true
3.times {
Thread.start {
mutex.synchronize {
puts "a1"
while (flg)......cv.wait(mutex)
end
puts "a2"
}
}
}
Thread.start {
mutex.synchronize {
flg = false
cv.broadcast
}
}
sleep 1
# => a1
# => a1
# => a1
# => a2
# => a2
# => a2
//}...