ライブラリ
- ビルトイン (139)
- fileutils (12)
-
irb
/ context (12) -
irb
/ extend-command (12) -
irb
/ input-method (48) - json (12)
-
minitest
/ unit (1) - openssl (24)
-
shell
/ command-processor (6) -
syslog
/ logger (12) - win32ole (36)
クラス
- Enumerator (14)
-
IRB
:: Context (12) -
IRB
:: FileInputMethod (12) -
IRB
:: InputMethod (12) -
IRB
:: ReadlineInputMethod (12) -
IRB
:: StdioInputMethod (12) -
MiniTest
:: Unit :: TestCase (1) - NoMethodError (19)
-
OpenSSL
:: SSL :: SSLContext (24) - Regexp (24)
-
RubyVM
:: InstructionSequence (36) -
Shell
:: CommandProcessor (6) -
Syslog
:: Logger (12) - TracePoint (12)
- WIN32OLE (12)
-
WIN32OLE
_ METHOD (12) -
WIN32OLE
_ PARAM (12)
モジュール
オブジェクト
- main (24)
キーワード
-
collect
_ method (12) -
define
_ method (24) - disasm (12)
- disassemble (12)
-
irb
_ original _ method _ name (12) -
json
_ create (12) -
last
_ match (24) -
make
_ methods (12) -
method
_ added (6) - new (153)
- of (22)
-
ole
_ show _ help (12) -
test
_ methods (1)
検索結果
先頭5件
- IRB
:: Context . new(irb , workspace = nil , input _ method = nil , output _ method = nil) -> IRB :: Context - Enumerator
. new(obj , method = :each , *args) -> Enumerator - OpenSSL
:: SSL :: SSLContext . new(ssl _ method) -> OpenSSL :: SSL :: SSLContext - RubyVM
:: InstructionSequence . of(body) -> RubyVM :: InstructionSequence - RubyVM
:: InstructionSequence . disasm(body) -> String
-
IRB
:: Context . new(irb , workspace = nil , input _ method = nil , output _ method = nil) -> IRB :: Context (3415.0) -
自身を初期化します。
...た場合は新しく作成されます。
@param input_method String、IRB::InputMethod のサブクラスの
オブジェクト、nil のいずれかを指定します。
@param output_method IRB::OutputMethod のサブクラスのオブジェクト......を指定します。省略した場合は
IRB::StdioOutputMethod オブジェクトが新しく
作成されます。... -
Enumerator
. new(obj , method = :each , *args) -> Enumerator (3240.0) -
オブジェクト obj について、 each の代わりに method という 名前のメソッドを使って繰り返すオブジェクトを生成して返します。 args を指定すると、 method の呼び出し時に渡されます。
...わりに method という
名前のメソッドを使って繰り返すオブジェクトを生成して返します。
args を指定すると、 method の呼び出し時に渡されます。
@param obj イテレータメソッドのレシーバとなるオブジェクト
@param method イテレ......ータメソッドの名前を表すシンボルまたは文字列
@param args イテレータメソッドの呼び出しに渡す任意個の引数
//emlist[例][ruby]{
str = "xyz"
enum = Enumerator.new(str, :each_byte)
p enum.map {|b| '%02x' % b } # => ["78", "79", "7a"]
//}... -
OpenSSL
:: SSL :: SSLContext . new(ssl _ method) -> OpenSSL :: SSL :: SSLContext (3214.0) -
SSL コンテキストオブジェクトを生成します。
...method で利用するプロトコルの種類を文字列もしくは
シンボルで指定します。以下のいずれかが利用可能です。
* 'TLSv1' TLSv1サーバクライアント両用
* 'TLSv1_server' TLSv1サーバ用
* 'TLSv1_client' TLSv1クライアント用
* 'T......LSv1_1'
* 'TLSv1_1_server'
* 'TLSv1_1_client'
* 'TLSv1_2'
* 'TLSv1_2_server'
* 'TLSv1_2_client'
* 'SSLv2' SSLv2サーバクライアント両用
* 'SSLv2_server' SSLv2サーバ用
* 'SSLv2_client' SSLv2クライアント用
* 'SSLv3' SSLv3サーバクライアン......ト両用
* 'SSLv3_server' SSLv3サーバ用
* 'SSLv3_client' SSLv3クライアント用
* 'SSLv23' SSLv2,3/TLSv1サーバクライアント両用
* 'SSLv23_server' SSLv2,3/TLSv1サーバ用
* 'SSLv23_client' SSLv2,3/TLSv1クライアント用
SSLv2 はプロトコル上の脆弱... -
RubyVM
:: InstructionSequence . of(body) -> RubyVM :: InstructionSequence (3141.0) -
引数 body で指定した Proc、Method オブジェクトを元に RubyVM::InstructionSequence オブジェクトを作成して返します。
...した Proc、Method オブジェクトを元に
RubyVM::InstructionSequence オブジェクトを作成して返します。
@param body Proc、Method オブジェクトを指定します。
例1:irb で実行した場合
# proc
> p = proc { num = 1 + 2 }
> RubyVM::InstructionSequence.of(p......nstructionSequence:block in irb_binding@(irb)>
# method
> def foo(bar); puts bar; end
> RubyVM::InstructionSequence.of(method(:foo))
> # => <RubyVM::InstructionSequence:foo@(irb)>
例2: RubyVM::InstructionSequence.compile_file を使用した場合
# /tmp/iseq_of.rb
def hello
puts......{ str = 'a' + 'b' }
# irb
> require '/tmp/iseq_of.rb'
# hello メソッド
> RubyVM::InstructionSequence.of(method(:hello))
> # => #<RubyVM::InstructionSequence:0x007fb73d7cb1d0>
# グローバル proc
> RubyVM::InstructionSequence.of($a_global_proc)
> # => #<RubyVM::InstructionS... -
RubyVM
:: InstructionSequence . disasm(body) -> String (3131.0) -
引数 body で指定したオブジェクトから作成した RubyVM::InstructionSequence オブジェクトを人間が読める形式の文字 列に変換して返します。
...:InstructionSequence オブジェクトを人間が読める形式の文字
列に変換して返します。
@param body Proc、Method オブジェクトを指定します。
例1:Proc オブジェクトを指定した場合
# /tmp/proc.rb
p = proc { num = 1 + 2 }
puts RubyVM::InstructionS......<RubyVM::InstructionSequence:block in <main>@/tmp/proc.rb>===
== catch table
| catch type: redo st: 0000 ed: 0012 sp: 0000 cont: 0000
| catch type: next st: 0000 ed: 0012 sp: 0000 cont: 0012
|------------------------------------------------------------------------
local table (size: 2......rgc: 0 [opts: 0, rest: -1, post: 0, block: -1] s1)
[ 2] num
0000 trace 1 ( 1)
0002 putobject 1
0004 putobject 2
0006 opt_plus <ic:1>
0008 dup
0009 setlocal num, 0
0012 leave
例2:Method オブ... -
RubyVM
:: InstructionSequence . disassemble(body) -> String (3131.0) -
引数 body で指定したオブジェクトから作成した RubyVM::InstructionSequence オブジェクトを人間が読める形式の文字 列に変換して返します。
...:InstructionSequence オブジェクトを人間が読める形式の文字
列に変換して返します。
@param body Proc、Method オブジェクトを指定します。
例1:Proc オブジェクトを指定した場合
# /tmp/proc.rb
p = proc { num = 1 + 2 }
puts RubyVM::InstructionS......<RubyVM::InstructionSequence:block in <main>@/tmp/proc.rb>===
== catch table
| catch type: redo st: 0000 ed: 0012 sp: 0000 cont: 0000
| catch type: next st: 0000 ed: 0012 sp: 0000 cont: 0012
|------------------------------------------------------------------------
local table (size: 2......rgc: 0 [opts: 0, rest: -1, post: 0, block: -1] s1)
[ 2] num
0000 trace 1 ( 1)
0002 putobject 1
0004 putobject 2
0006 opt_plus <ic:1>
0008 dup
0009 setlocal num, 0
0012 leave
例2:Method オブ... -
OpenSSL
:: SSL :: SSLContext . new -> OpenSSL :: SSL :: SSLContext (3114.0) -
SSL コンテキストオブジェクトを生成します。
...method で利用するプロトコルの種類を文字列もしくは
シンボルで指定します。以下のいずれかが利用可能です。
* 'TLSv1' TLSv1サーバクライアント両用
* 'TLSv1_server' TLSv1サーバ用
* 'TLSv1_client' TLSv1クライアント用
* 'T......LSv1_1'
* 'TLSv1_1_server'
* 'TLSv1_1_client'
* 'TLSv1_2'
* 'TLSv1_2_server'
* 'TLSv1_2_client'
* 'SSLv2' SSLv2サーバクライアント両用
* 'SSLv2_server' SSLv2サーバ用
* 'SSLv2_client' SSLv2クライアント用
* 'SSLv3' SSLv3サーバクライアン......ト両用
* 'SSLv3_server' SSLv3サーバ用
* 'SSLv3_client' SSLv3クライアント用
* 'SSLv23' SSLv2,3/TLSv1サーバクライアント両用
* 'SSLv23_server' SSLv2,3/TLSv1サーバ用
* 'SSLv23_client' SSLv2,3/TLSv1クライアント用
SSLv2 はプロトコル上の脆弱... -
TracePoint
. new(*events) {|obj| . . . } -> TracePoint (3107.0) -
新しい TracePoint オブジェクトを作成して返します。トレースを有効 にするには TracePoint#enable を実行してください。
...い TracePoint オブジェクトを作成して返します。トレースを有効
にするには TracePoint#enable を実行してください。
//emlist[例:irb で実行した場合][ruby]{
trace = TracePoint.new(:call) do |tp|
p [tp.lineno, tp.defined_class, tp.method_id, tp.event]
end......=> #<TracePoint:0x007f17372cdb20>
trace.enable
# => false
puts "Hello, TracePoint!"
# ...
# [69, IRB::Notifier::AbstractNotifier, :printf, :call]
# ...
//}
トレースを無効にするには TracePoint#disable を実行してください。
//emlist[][ruby]{
trace.disable
//}
@param events......トレースするイベントを String か Symbol で任
意の数指定します。
: :line
式の評価。
: :class
クラス定義、特異クラス定義、モジュール定義への突入。
: :end
クラス定義、特異クラス定義、モジュール定義の... -
Enumerator
. new(size=nil) {|y| . . . } -> Enumerator (3105.0) -
Enumerator オブジェクトを生成して返します。与えられたブロックは Enumerator::Yielder オブジェクトを 引数として実行されます。
...Enumerator オブジェクトを生成して返します。与えられたブロックは Enumerator::Yielder オブジェクトを
引数として実行されます。
生成された Enumerator オブジェクトに対して each を呼ぶと、この生成時に指定されたブロックを......る Enumerator オブジェクトの要素数を指定します。
Integer、Float::INFINITY、Proc オブジェク
ト、nil のいずれかを指定します。Enumerator#size の実
行時に参照されます。
//emlist[例][ruby]{
enum = Enumerator.new{|y|......(1..10).each{|i|
y << i if i % 5 == 0
}
}
enum.each{|i| p i }
#=> 5
# 10
fib = Enumerator.new { |y|
a = b = 1
loop {
y << a
a, b = b, a + b
}
}
p fib.take(10) #=> [1, 1, 2, 3, 5, 8, 13, 21, 34, 55]
//}... -
WIN32OLE
_ PARAM . new(ole _ method , index) -> WIN32OLE _ PARAM (250.0) -
メソッドとパラメータ位置を指定してWIN32OLE_PARAMのインスタンスを作成します。
...ッド
で生成するよりも、WIN32OLE_METHOD#paramsを参照するほうが簡単です。
@param ole_method パラメータを取得するWIN32OLE_METHODのインスタンス。
@param index パラメータの位置。最左端を1とします。
@return メソッドの指定位置のパラ......オブジェクトを返します。
@raise TypeError ole_methodパラメータがWIN32OLE_METHODのインスタンスではありません。
@raise IndexError indexパラメータが1からパラメータの数の範囲にありません。
@raise RuntimeError 該当メソッドのメタデータ......が取得できません。
excel = WIN32OLE.new('Excel.Application')
method = excel.ole_method('Run')
param1 = WIN32OLE_PARAM.new(method, 1)
puts "#{param1.ole_type} #{param1.name}"...