種類
- インスタンスメソッド (10)
- 特異メソッド (6)
- 文書 (2)
- クラス (1)
- 定数 (1)
ライブラリ
- ビルトイン (10)
- fiddle (5)
- openssl (1)
-
webrick
/ httpproxy (1) -
webrick
/ httpserver (1)
クラス
-
Fiddle
:: Closure (1) -
Fiddle
:: Closure :: BlockCaller (1) -
Fiddle
:: Function (3) - LocalJumpError (1)
- Method (1)
- Object (1)
-
OpenSSL
:: SSL :: SSLContext (1) - Thread (2)
-
Thread
:: Backtrace :: Location (4) -
WEBrick
:: HTTPProxyServer (1) -
WEBrick
:: HTTPServer (1)
キーワード
- Location (1)
- STDCALL (1)
-
absolute
_ path (1) -
base
_ label (1) - clone (1)
- inspect (1)
- reason (1)
-
report
_ on _ exception (2) -
session
_ new _ cb= (1) -
singleton
_ method (1) -
to
_ s (1) - 制御構造 (1)
- 正規表現 (1)
検索結果
先頭5件
- Fiddle
:: Closure :: BlockCaller . new(ret , args , abi=Fiddle :: Function :: DEFAULT) { . . . } -> Fiddle :: Closure :: BlockCaller - Fiddle
:: Function # call(*args) -> Integer|DL :: CPtr|nil - Fiddle
:: Function . new(ptr , args , ret _ type , abi=Fiddle :: Function :: DEFAULT , name: nil) -> Fiddle :: Function - Fiddle
:: Closure . new(ret , args , abi=Fiddle :: Function :: DEFAULT) -> Fiddle :: Closure - OpenSSL
:: SSL :: SSLContext # session _ new _ cb=(cb)
-
Fiddle
:: Closure :: BlockCaller . new(ret , args , abi=Fiddle :: Function :: DEFAULT) { . . . } -> Fiddle :: Closure :: BlockCaller (82822.0) -
Ruby のブロックを呼び出す Fiddle::Closure オブジェクトを返します。
Ruby のブロックを呼び出す Fiddle::Closure オブジェクトを返します。
args、ret で関数の引数と返り値の型を指定します。
指定は Fiddle::Function.new と同様なので、そちら
を参照してください。
@param ret 返り値の型
@param args 引数の型を表す配列
@param abi 呼出規約 -
Fiddle
:: Function # call(*args) -> Integer|DL :: CPtr|nil (81640.0) -
関数を呼び出します。
関数を呼び出します。
Fiddle::Function.new で指定した引数と返り値の型に基いて
Ruby のオブジェクトを適切に C のデータに変換して C の関数を呼び出し、
その返り値を Ruby のオブジェクトに変換して返します。
引数の変換は以下の通りです。
: void* (つまり任意のポインタ型)
nil ならば C の NULL に変換されます
Fiddle::Pointer は保持している C ポインタに変換されます。
文字列であればその先頭ポインタになります。
IO オブジェクトであれば FILE* が渡されます。
整数であればそれがアドレスとみ... -
Fiddle
:: Function . new(ptr , args , ret _ type , abi=Fiddle :: Function :: DEFAULT , name: nil) -> Fiddle :: Function (73558.0) -
ptr (関数ポインタ)から Fiddle::Function オブジェクトを 生成します。
ptr (関数ポインタ)から Fiddle::Function オブジェクトを
生成します。
ptr には Fiddle::Handle から Fiddle::Handle#sym などで取りだした
関数ポインタ(を表す整数)、もしくは関数を指している
Fiddle::Pointer を渡します。
args、ret_type で関数の引数と返り値の型を指定します。これには以下の
定数が利用できます。「-TYPE_INT」 のように符号を反転させると unsigned を
意味します。
* Fiddle::TYPE_VOID
* Fiddle::TYPE_VOIDP
* Fidd... -
Fiddle
:: Closure . new(ret , args , abi=Fiddle :: Function :: DEFAULT) -> Fiddle :: Closure (64270.0) -
そのクラスの call メソッドを呼びだすような Fiddle::Closure オブジェクトを返します。
そのクラスの call メソッドを呼びだすような
Fiddle::Closure オブジェクトを返します。
args、ret で関数の引数と返り値の型を指定します。
指定は Fiddle::Function.new と同様なので、そちら
を参照してください。
@param ret 返り値の型
@param args 引数の型を表す配列
@param abi 呼出規約 -
OpenSSL
:: SSL :: SSLContext # session _ new _ cb=(cb) (63640.0) -
新たなセッションが作られたときに呼び出されるコールバックを 指定します。
新たなセッションが作られたときに呼び出されるコールバックを
指定します。
コールバックオブジェクトを call するときの引数は
[ 接続オブジェクト(OpenSSL::SSL::SSLSocket), 新たなセッション(OpenSSL::SSL::Session)]
という配列です。
セッションキャッシュについて詳しくは OpenSSL::SSL::Session を
見てください。
@param cb コールバックオブジェクト(Proc もしくは Method)
@see OpenSSL::SSL::SSLContext#session_new_cb -
WEBrick
:: HTTPProxyServer . new(config , default = WEBrick :: Config :: HTTP) -> WEBrick :: HTTPProxyServer (55312.0) -
プロクシオブジェクトを生成して返します。
プロクシオブジェクトを生成して返します。
@param config 設定を保存したハッシュを指定します。
設定として有効なハッシュのキーとその値は WEBrick::HTTPServer.new と同じです。
それに加えて以下のキーが有効です。
: :ProxyAuthProc
プロクシ認証を行う Proc オブジェクトを指定します。この proc は
WEBrick::HTTPResponse オブジェクトと WEBrick::HTTPRequest オブジェクトを引数として
proc.call(req, res) ... -
WEBrick
:: HTTPServer . new(config = {} , default = WEBrick :: Config :: HTTP) -> WEBrick :: HTTPServer (55222.0) -
HTTPServer オブジェクトを生成して返します。
HTTPServer オブジェクトを生成して返します。
@param config 設定を保存したハッシュを指定します。有効なキー(Symbol オブジェクト)と値は以下のとおりです。
: :RequestTimeout
どれだけの時間 クライアントからの入力を待つかを整数か Float で指定します。
単位は秒です。
: :HTTPVersion
使用する HTTP のバージョンです。WEBrick::HTTPVersion オブジェクトで指定します。デフォルトは 1.1 です。
: :AccessLog
アクセスログの出力先とフォーマットを [[io, format],... -
Fiddle
:: Function :: STDCALL -> Integer (45619.0) -
Windows の stdcall 呼出規約を表します。
Windows の stdcall 呼出規約を表します。
stdcall 呼出規約を持つ環境でのみ定義されます。
@see Fiddle::Function.new -
Thread
# report _ on _ exception -> bool (37069.0) -
真の場合、そのスレッドが例外によって終了した時に、その内容を $stderr に報告します。
真の場合、そのスレッドが例外によって終了した時に、その内容を $stderr に報告します。
デフォルトはスレッド作成時の Thread.report_on_exception です。
@param newstate スレッド実行中に例外発生した場合、その内容を報告するかどうかを true か false で指定します。
//emlist[例][ruby]{
a = Thread.new{ Thread.stop; raise }
a.report_on_exception = true
a.report_on_exception # => true
a.run
# => #<Th... -
Thread
. report _ on _ exception -> bool (36997.0) -
真の時は、いずれかのスレッドが例外によって終了した時に、その内容を $stderr に報告します。
真の時は、いずれかのスレッドが例外によって終了した時に、その内容を $stderr に報告します。
デフォルトは true です。
Thread.new { 1.times { raise } }
は $stderr に以下のように出力します:
#<Thread:...> terminated with exception (report_on_exception is true):
Traceback (most recent call last):
2: from -e:1:in `block in <main>'
1: fro... -
Method
# clone -> Method (36655.0) -
自身を複製した Method オブジェクトを作成して返します。
自身を複製した Method オブジェクトを作成して返します。
//emlist[例][ruby]{
class Foo
def foo
"foo"
end
end
m = Foo.new.method(:foo) # => #<Method: Foo#foo>
m.call # => "foo"
m.clone # => #<Method: Foo#foo>
m.clone.call # => "foo"
//} -
Object
# singleton _ method(name) -> Method (36637.0) -
オブジェクトの特異メソッド name をオブジェクト化した Method オブ ジェクトを返します。
オブジェクトの特異メソッド name をオブジェクト化した Method オブ
ジェクトを返します。
@param name メソッド名をSymbol またはStringで指定します。
@raise NameError 定義されていないメソッド名を引数として与えると発生します。
//emlist[][ruby]{
class Demo
def initialize(n)
@iv = n
end
def hello()
"Hello, @iv = #{@iv}"
end
end
k = Demo.new(99)
def k.hi
"Hi, @iv = ... -
Thread
:: Backtrace :: Location (36109.0) -
Ruby のフレームを表すクラスです。
Ruby のフレームを表すクラスです。
Kernel.#caller_locations から生成されます。
//emlist[例1][ruby]{
# caller_locations.rb
def a(skip)
caller_locations(skip)
end
def b(skip)
a(skip)
end
def c(skip)
b(skip)
end
c(0..2).map do |call|
puts call.to_s
end
//}
例1の実行結果:
caller_locations.rb:2:in `a'
caller_locations... -
LocalJumpError
# reason -> Symbol (27655.0) -
例外を発生させた原因をシンボルで返します。
例外を発生させた原因をシンボルで返します。
返す値は以下のいずれかです。
* :break
* :redo
* :retry
* :next
* :return
* :noreason
例:
def foo
proc { return 10 }
end
begin
foo.call
rescue LocalJumpError => err
p err # => #<LocalJumpError: return from block-closure>
p err.reason ... -
Thread
:: Backtrace :: Location # base _ label -> String (27373.0) -
self が表すフレームの基本ラベルを返します。通常、 Thread::Backtrace::Location#label から修飾を取り除いたもので構成 されます。
self が表すフレームの基本ラベルを返します。通常、
Thread::Backtrace::Location#label から修飾を取り除いたもので構成
されます。
//emlist[例][ruby]{
# foo.rb
class Foo
attr_accessor :locations
def initialize(skip)
@locations = caller_locations(skip)
end
end
Foo.new(0..2).locations.map do |call|
puts call.base_label
end
# => init... -
Thread
:: Backtrace :: Location # absolute _ path -> String (27355.0) -
self が表すフレームの絶対パスを返します。
self が表すフレームの絶対パスを返します。
//emlist[例][ruby]{
# foo.rb
class Foo
attr_accessor :locations
def initialize(skip)
@locations = caller_locations(skip)
end
end
Foo.new(0..2).locations.map do |call|
puts call.absolute_path
end
# => /path/to/foo.rb
# /path/to/foo.rb
# /path/to/foo.rb
//}
@see... -
Thread
:: Backtrace :: Location # inspect -> String (18073.0) -
Thread::Backtrace::Location#to_s の結果を人間が読みやすいような文 字列に変換したオブジェクトを返します。
Thread::Backtrace::Location#to_s の結果を人間が読みやすいような文
字列に変換したオブジェクトを返します。
//emlist[例][ruby]{
# foo.rb
class Foo
attr_accessor :locations
def initialize(skip)
@locations = caller_locations(skip)
end
end
Foo.new(0..2).locations.map do |call|
puts call.inspect
end
# => "path/to/foo.rb:5:in ... -
Thread
:: Backtrace :: Location # to _ s -> String (18073.0) -
self が表すフレームを Kernel.#caller と同じ表現にした文字列を返し ます。
self が表すフレームを Kernel.#caller と同じ表現にした文字列を返し
ます。
//emlist[例][ruby]{
# foo.rb
class Foo
attr_accessor :locations
def initialize(skip)
@locations = caller_locations(skip)
end
end
Foo.new(0..2).locations.map do |call|
puts call.to_s
end
# => path/to/foo.rb:5:in `initialize'
# path/to/foo... -
制御構造 (18037.0)
-
制御構造 条件分岐: * if * unless * case 繰り返し: * while * until * for * break * next * redo * retry 例外処理: * raise * begin その他: * return * BEGIN * END
制御構造
条件分岐:
* if
* unless
* case
繰り返し:
* while
* until
* for
* break
* next
* redo
* retry
例外処理:
* raise
* begin
その他:
* return
* BEGIN
* END
Rubyでは(Cなどとは異なり)制御構造は式であって、何らかの値を返すものが
あります(返さないものもあります。値を返さない式を代入式の右辺に置くと
syntax error になります)。
R... -
正規表現 (469.0)
-
正規表現 * metachar * expansion * char * anychar * string * str * quantifier * capture * grouping * subexp * selector * anchor * cond * option * encoding * comment * free_format_mode * absenceop * list * specialvar * references
正規表現
* metachar
* expansion
* char
* anychar
* string
* str
* quantifier
* capture
* grouping
* subexp
* selector
* anchor
* cond
* option
* encoding
* comment
* free_format_mode
* absenceop
* list
* specialvar
* references
正規表現(regular expression)は文字列のパタ...