769件ヒット
[1-100件を表示]
(0.106秒)
ライブラリ
- ビルトイン (521)
- csv (22)
-
fiddle
/ import (11) - openssl (11)
- optparse (35)
- pp (11)
- prettyprint (1)
- rake (11)
- shell (12)
-
shell
/ command-processor (12) -
shell
/ filter (12) - socket (22)
- strscan (22)
- win32ole (11)
- zlib (55)
クラス
- Array (96)
- BasicSocket (22)
-
CSV
:: FieldInfo (22) - File (11)
- IO (128)
- MatchData (48)
- Method (11)
- Module (11)
- Object (11)
-
OpenSSL
:: SSL :: SSLSocket (11) - OptionParser (35)
- PrettyPrint (1)
- Random (33)
- Regexp (22)
- Shell (12)
-
Shell
:: CommandProcessor (12) -
Shell
:: Filter (12) - String (22)
- StringScanner (22)
- SystemCallError (11)
- TracePoint (128)
- WIN32OLE (11)
-
Zlib
:: GzipReader (55)
モジュール
-
Fiddle
:: Importer (11) -
Rake
:: TaskManager (11)
キーワード
- <=> (11)
- =~ (11)
- [] (51)
- at (11)
- begin (11)
- bind (11)
- binding (11)
- byteoffset (4)
-
callee
_ id (11) -
defined
_ class (11) -
each
_ codepoint (22) - errno (11)
-
eval
_ script (6) - event (11)
- fcntl (11)
- fetch (33)
- first? (1)
- getc (11)
- getpeereid (11)
- index (11)
- inspect (11)
-
instruction
_ sequence (6) - intern (11)
-
internal
_ encoding (11) - line (11)
- lineno (22)
- match? (11)
-
matched
_ size (11) -
method
_ id (11) - offset (22)
-
ole
_ query _ interface (11) - pack (19)
- parameters (6)
- parse (16)
- parse! (8)
- path (11)
- pending (11)
- pid (11)
- pos (22)
-
pretty
_ print (11) - pwrite (7)
-
raised
_ exception (11) - rand (33)
- readbyte (11)
- readchar (11)
- recvmsg (11)
-
return
_ value (11) - size (11)
-
source
_ location (11) - sum (11)
-
summary
_ width (11) - sysseek (11)
- syswrite (11)
- tell (22)
- test (18)
- unpack (11)
- write (11)
- ~ (11)
検索結果
先頭5件
-
MatchData
# end(n) -> Integer | nil (18339.0) -
n 番目の部分文字列終端のオフセットを返します。
...IndexError 範囲外の n を指定した場合に発生します。
//emlist[例][ruby]{
/(foo)(bar)(BAZ)?/ =~ "foobarbaz"
p $~.end(0) # => 6
p $~.end(1) # => 3
p $~.end(2) # => 6
p $~.end(3) # => nil
p $~.end(4) # => `end': index 4 out of matches (IndexError)
//}
@see MatchData#begin... -
OpenSSL
:: SSL :: SSLSocket # pending -> Integer | nil (6302.0) -
OpenSSL内部のバッファが保持している、直ちに読み取り可能な データのバイト数を返します。
OpenSSL内部のバッファが保持している、直ちに読み取り可能な
データのバイト数を返します。
ハンドシェイク開始前には nil を返します。 -
IO
# each _ codepoint {|c| . . . } -> self (6232.0) -
IO の各コードポイントに対して繰り返しブロックを呼びだします。
...にはコードポイントを表す整数が渡されます。
ブロックを省略した場合には、Enumerator を返します。
//emlist[例][ruby]{
IO.write("testfile", "abcdeあ")
File.open("testfile") do |f|
f.each_codepoint { |i| p i }
end
# => 97
# 98
# 99
# 100
# 101
# 12354
//}... -
IO
# internal _ encoding -> Encoding | nil (6220.0) -
IO の内部エンコーディングを返します。 内部エンコーディングが指定されていない場合は nil を返します。
...エンコーディングが指定されていない場合は nil を返します。
//emlist[例][ruby]{
IO.write("testfile", "abcde")
File.open("testfile") do |f|
p f.internal_encoding # => nil
f.set_encoding("ASCII-8BIT", "EUC-JP")
p f.internal_encoding # => #<Encoding:EUC-JP>
end
//}... -
IO
# each _ codepoint -> Enumerator (6132.0) -
IO の各コードポイントに対して繰り返しブロックを呼びだします。
...にはコードポイントを表す整数が渡されます。
ブロックを省略した場合には、Enumerator を返します。
//emlist[例][ruby]{
IO.write("testfile", "abcdeあ")
File.open("testfile") do |f|
f.each_codepoint { |i| p i }
end
# => 97
# 98
# 99
# 100
# 101
# 12354
//}... -
WIN32OLE
# ole _ query _ interface(iid) -> WIN32OLE (6131.0) -
IID(インターフェイスID)を指定してオブジェクトの別のインターフェイスを 持つオブジェクトを取得します。
...untimeError 指定したIIDをオブジェクトが持たない場合に通知されます。
ie = WIN32OLE.new('InternetExplorer.Application')
ie_web_app = ie.ole_query_interface('{0002DF05-0000-0000-C000-000000000046}')
上例のie_web_appは、ieと同じインスタンスとなりま......ということを意
味します。当然、それはサーバ実装のバグです。
問題は、C++のvtblアクセスや.NET FrameworkのCOM Interopのために静的型情
報が必要となることです。このため、一度あるインターフェイスを返すことに
決めた場......指定したとしても正しく呼び出せます。つ
まり、http://www.ruby-forum.com/topic/109954で例示されているよ
うなole_query_interfaceメソッドの呼び出しは不要です。
もし、当メソッドの呼び出しが本当に必要なのであれば、まず、該当... -
Object
# pretty _ print(pp) -> () (6119.0) -
PP.pp や Kernel.#pp がオブジェクトの内容を出力するときに 呼ばれるメソッドです。PP オブジェクト pp を引数として呼ばれます。
...ます。
そのとき pretty_print メソッドは指定された pp に対して表示したい自身の内容を追加して
いかなければいけません。いくつかの組み込みクラスについて、
pp ライブラリはあらかじめ pretty_print メソッドを定義していま......ブジェクトです。
//emlist[][ruby]{
require 'pp'
class Array
def pretty_print(q)
q.group(1, '[', ']') {
q.seplist(self) {|v|
q.pp v
}
}
end
end
//}
@see Object#pretty_print_cycle, Object#inspect, PrettyPrint#text, PrettyPrint#group, PrettyPrint#breakable......@param pp PP オブジェクトです。
//emlist[][ruby]{
class Array
def pretty_print(q)
q.group(1, '[', ']') {
q.seplist(self) {|v|
q.pp v
}
}
end
end
//}
@see Object#pretty_print_cycle, Object#inspect, PrettyPrint#text, PrettyPrint#group, PrettyPrint#breakable... -
Rake
:: TaskManager # intern(task _ class , task _ name) -> Rake :: Task (6119.0) -
タスクを検索します。
...[][ruby]{
# Rakefile での記載例とする
task default: :test_rake_app
task :test_rake_app do |task|
task.application.intern(Rake::Task, "test_rake_app") # => <Rake::Task test_rake_app => []>
task.application.intern(Rake::Task, "sample_task") # => <Rake::Task sample_task => []>
end
//}... -
TracePoint
# defined _ class -> Class | module (3216.0) -
メソッドを定義したクラスかモジュールを返します。
...def foo; end; end
trace = TracePoint.new(:call) do |tp|
p tp.defined_class # => C
end.enable do
C.new.foo
end
//}
メソッドがモジュールで定義されていた場合も(include に関係なく)モジュー
ルを返します。
//emlist[例][ruby]{
module M; def foo; end; end
class C......; include M; end;
trace = TracePoint.new(:call) do |tp|
p tp.defined_class # => M
end.enable do
C.new.foo
end
//}
[注意] 特異メソッドを実行した場合は TracePoint#defined_class は特異クラ
スを返します。また、Kernel.#set_trace_func の 6 番目のブロックパ
ラ......く元のクラスを返します。
//emlist[例][ruby]{
class C; def self.foo; end; end
trace = TracePoint.new(:call) do |tp|
p tp.defined_class # => #<Class:C>
end.enable do
C.foo
end
//}
Kernel.#set_trace_func と TracePoint の上記の差分に注意して
ください。
@see 50864... -
TracePoint
# callee _ id -> Symbol | nil (3138.0) -
イベントが発生したメソッドの呼ばれた名前を Symbol で返します。 トップレベルであった場合は nil を返します。
...した場合に発生します。
//emlist[][ruby]{
class C
def method_name
end
alias alias_name method_name
end
trace = TracePoint.new(:call) do |tp|
p [tp.method_id, tp.callee_id] # => [:method_name, :alias_name]
end
trace.enable do
C.new.alias_name
end
//}
@see TracePoint#method_id...