1937件ヒット
[1-100件を表示]
(0.109秒)
種類
ライブラリ
- ビルトイン (788)
- continuation (48)
- fiddle (120)
- logger (36)
-
minitest
/ unit (17) - monitor (12)
-
net
/ http (24) - open-uri (4)
- openssl (120)
- readline (12)
-
rubygems
/ requirement (12) - set (18)
-
syslog
/ logger (24) - tracer (72)
- tsort (93)
-
webrick
/ httpproxy (12) -
webrick
/ httpserver (36) -
webrick
/ httpservlet / prochandler (12)
クラス
- BasicObject (24)
- Continuation (24)
- Exception (8)
-
Fiddle
:: Closure (12) -
Fiddle
:: Closure :: BlockCaller (24) -
Fiddle
:: Function (36) -
Fiddle
:: Handle (24) -
Gem
:: Requirement (12) - Hash (12)
- LocalJumpError (12)
- Logger (24)
-
Logger
:: Formatter (12) - Method (115)
- Module (24)
-
Net
:: HTTP (24) - NoMethodError (9)
- Object (24)
-
OpenSSL
:: SSL :: SSLContext (84) -
OpenSSL
:: X509 :: Store (24) - Set (24)
- Symbol (12)
-
Syslog
:: Logger (12) -
Syslog
:: Logger :: Formatter (12) - SystemCallError (60)
- Thread (60)
-
Thread
:: Backtrace :: Location (48) - TracePoint (130)
- Tracer (72)
- UnboundMethod (18)
-
WEBrick
:: HTTPProxyServer (12) -
WEBrick
:: HTTPServer (36) -
WEBrick
:: HTTPServlet :: ProcHandler (12)
モジュール
- Enumerable (48)
- Fiddle (24)
- Kernel (136)
-
MiniTest
:: Assertions (17) -
OpenSSL
:: X509 (12) - Readline (12)
-
RubyVM
:: AbstractSyntaxTree (10) - TSort (93)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (12) - << (7)
- === (20)
- >> (7)
- Continuation (12)
-
EVENT
_ SYMBOL (12) - Location (12)
- Method (12)
- MonitorMixin (12)
-
NEWS for Ruby 2
. 2 . 0 (11) -
NEWS for Ruby 2
. 3 . 0 (10) - OPS (12)
- STDCALL (12)
- SystemCallError (12)
- UnboundMethod (12)
-
V
_ ERR _ UNABLE _ TO _ GET _ ISSUER _ CERT _ LOCALLY (12) - [] (24)
- abort (12)
-
absolute
_ path (12) -
add
_ filter (24) -
add
_ trace _ func (12) - assert (1)
-
assert
_ block (1) -
assert
_ empty (1) -
assert
_ equal (1) -
assert
_ in _ delta (1) -
assert
_ in _ epsilon (1) -
assert
_ includes (1) -
assert
_ instance _ of (1) -
assert
_ kind _ of (1) -
assert
_ match (1) -
assert
_ nil (1) -
assert
_ operator (1) -
assert
_ respond _ to (1) -
assert
_ same (1) -
assert
_ send (1) -
assert
_ throws (1) - assign (12)
-
base
_ label (12) - bind (6)
-
bind
_ call (12) - binding (12)
- bmcall (12)
-
call
_ cfunc (12) -
call
_ end _ proc (12) -
call
_ final (12) -
call
_ op (12) -
call
_ trace _ func (12) - callcc (12)
-
callee
_ id (12) - caller (36)
-
caller
_ locations (24) - clone (12)
-
completion
_ proc= (12) - curry (22)
-
default
_ proc (12) -
defined
_ class (12) - detect (24)
-
display
_ c _ call (12) -
display
_ c _ call= (12) -
display
_ c _ call? (12) - divide (24)
-
each
_ strongly _ connected _ component (23) -
each
_ strongly _ connected _ component _ from (23) - errno (12)
- event (12)
-
exit
_ value (12) - fail (12)
- find (24)
- formatter (12)
- formatter= (24)
- inspect (24)
-
instance
_ eval (24) -
instance
_ method (12) -
last
_ error (12) - lineno (12)
- massign (12)
- method (12)
-
method
_ call (12) -
method
_ id (12) -
mount
_ proc (24) - new (144)
-
new
_ call (12) -
new
_ fcall (12) - open (4)
- parameters (7)
-
parse
_ file (10) - path (12)
-
private
_ call? (9) -
proc
_ call (12) -
proc
_ invoke (12) - raise (12)
-
rb
_ call (12) -
rb
_ call0 (12) -
rb
_ call _ super (12) -
rb
_ callcc (12) -
rb
_ cont _ call (12) -
rb
_ f _ caller (12) -
rb
_ funcall (12) -
rb
_ funcall2 (12) -
rb
_ funcall3 (12) -
rb
_ gc _ call _ finalizer _ at _ exit (12) -
rb
_ iterate (12) -
rb
_ obj _ call _ init (12) -
rb
_ undefined (12) -
rb
_ yield _ 0 (12) - rdoc (12)
-
rdoc
/ parser / c (12) -
report
_ on _ exception (18) -
report
_ on _ exception= (18) -
ruby 1
. 6 feature (12) -
ruby 1
. 8 . 4 feature (12) -
ruby 1
. 9 feature (12) -
ruby2
_ keywords (12) - self (3)
-
session
_ get _ cb= (12) -
session
_ new _ cb= (12) -
session
_ remove _ cb= (12) -
set
_ trace _ func (24) -
singleton
_ method (12) - skip (1)
-
strongly
_ connected _ components (12) -
super
_ method (11) - syscall (12)
-
tmp
_ dh _ callback (12) -
tmp
_ dh _ callback= (12) -
to
_ proc (24) -
to
_ s (12) - trace (12)
- tsort (24)
-
tsort
_ each (23) - umcall (12)
-
umethod
_ call (12) -
verify
_ callback (36) -
verify
_ callback= (36) -
win32
_ last _ error (12) - 制御構造 (12)
- 正規表現 (12)
検索結果
先頭5件
-
tsort (26120.0)
-
tsort はトポロジカルソートと強連結成分に関するモジュールを提供します。
...tsort はトポロジカルソートと強連結成分に関するモジュールを提供します。
=== Example
//emlist[][ruby]{
require 'tsort'
class Hash
include TSort
alias tsort_each_node each_key
def tsort_each_child(node, &block)
fetch(node).each(&block)
end
end
{1=>[2, 3],......=>[]}.tsort
#=> [3, 2, 1, 4]
{1=>[2], 2=>[3, 4], 3=>[2], 4=>[]}.strongly_connected_components
#=> [[4], [2, 3], [1]]
//}
=== より現実的な例
非常に単純な `make' に似たツールは以下のように実装できます。
//emlist[][ruby]{
require 'tsort'
class Make
def initialize......outputs.map {|f| File.mtime f}.min
rescue Errno::ENOENT
outputs_time = nil
end
if outputs_time == nil ||
inputs_time != nil && outputs_time <= inputs_time
sleep 1 if inputs_time != nil && inputs_time.to_i == Time.now.to_i
block.call... -
Continuation
# call(*ret) -> () (21201.0) -
self が記憶した状態を継続します。引数は そのまま Kernel.#callcc の戻り値になります。
...self が記憶した状態を継続します。引数は そのまま
Kernel.#callcc の戻り値になります。
@param ret 継続に復帰した時に返す値を指定します。... -
Fiddle
:: Closure :: BlockCaller # call(*args) -> object (21201.0) -
wrap しているブロックを呼び出します。
wrap しているブロックを呼び出します。
そのブロックの返り値がこのメソッドの返り値となります。
@param args 引数 -
Fiddle
:: Function # call(*args) -> Integer|DL :: CPtr|nil (21201.0) -
関数を呼び出します。
...関数を呼び出します。
Fiddle::Function.new で指定した引数と返り値の型に基いて
Ruby のオブジェクトを適切に C のデータに変換して C の関数を呼び出し、
その返り値を Ruby のオブジェクトに変換して返します。
引数の変換は......Fiddle::Pointer は保持している C ポインタに変換されます。
文字列であればその先頭ポインタになります。
IO オブジェクトであれば FILE* が渡されます。
整数であればそれがアドレスとみなされます。
to_ptr を持ってい......Fiddle::Pointer に
変換したものを用います。
to_i を持っているならば、それを呼びだし結果の整数を
アドレスと見なします
: (unsigned) char/short/int/long/long long
Ruby の整数を C の整数に変換します。
: double/float
Ruby の整... -
Logger
:: Formatter # call(severity , time , progname , msg) -> String (21201.0) -
ログ情報をフォーマットして返します。
...ログ情報をフォーマットして返します。
@param severity ログレベル。
@param time 時間。Time クラスのオブジェクト。
@param progname プログラム名
@param msg メッセージ。... -
Syslog
:: Logger :: Formatter # call(severity , time , progname , message) -> String (21201.0) -
引数を元にフォーマットした文字列を返します。
引数を元にフォーマットした文字列を返します。
ライブラリ内部で使用します。 -
Method
# call(*args) -> object (18214.0) -
メソッドオブジェクトに封入されているメソッドを起動します。
...f に渡される引数。
@see UnboundMethod#bind_call
@see spec/safelevel
//emlist[例][ruby]{
class Foo
def foo(arg)
"foo called with arg #{arg}"
end
end
m = Foo.new.method(:foo) # => #<Method: Foo#foo>
m[1] # => "foo called with arg 1"
m.call(2) # => "foo called with arg 2"
//}......@param args self に渡される引数。
@see UnboundMethod#bind_call
//emlist[例][ruby]{
class Foo
def foo(arg)
"foo called with arg #{arg}"
end
end
m = Foo.new.method(:foo) # => #<Method: Foo#foo>
m[1] # => "foo called with arg 1"
m.call(2) # => "foo called with arg 2"
//}... -
Method
# call(*args) { . . . } -> object (18214.0) -
メソッドオブジェクトに封入されているメソッドを起動します。
...f に渡される引数。
@see UnboundMethod#bind_call
@see spec/safelevel
//emlist[例][ruby]{
class Foo
def foo(arg)
"foo called with arg #{arg}"
end
end
m = Foo.new.method(:foo) # => #<Method: Foo#foo>
m[1] # => "foo called with arg 1"
m.call(2) # => "foo called with arg 2"
//}......@param args self に渡される引数。
@see UnboundMethod#bind_call
//emlist[例][ruby]{
class Foo
def foo(arg)
"foo called with arg #{arg}"
end
end
m = Foo.new.method(:foo) # => #<Method: Foo#foo>
m[1] # => "foo called with arg 1"
m.call(2) # => "foo called with arg 2"
//}... -
Method
# call(*args) -> object (18208.0) -
メソッドオブジェクトに封入されているメソッドを起動します。
...せん。
@param args self に渡される引数。
@see spec/safelevel
//emlist[例][ruby]{
class Foo
def foo(arg)
"foo called with arg #{arg}"
end
end
m = Foo.new.method(:foo) # => #<Method: Foo#foo>
m[1] # => "foo called with arg 1"
m.call(2) # => "foo called with arg 2"
//}... -
Method
# call(*args) { . . . } -> object (18208.0) -
メソッドオブジェクトに封入されているメソッドを起動します。
...せん。
@param args self に渡される引数。
@see spec/safelevel
//emlist[例][ruby]{
class Foo
def foo(arg)
"foo called with arg #{arg}"
end
end
m = Foo.new.method(:foo) # => #<Method: Foo#foo>
m[1] # => "foo called with arg 1"
m.call(2) # => "foo called with arg 2"
//}... -
VALUE rb
_ iterate(VALUE (*call _ proc)() , VALUE date1 , VALUE (*block _ proc)() , date2) (12506.0) -
ブロック付きメソッド(イテレータ)呼び出しを行う関数です.
... call_proc(data1) を実行します。そしてその関数か
その直下のメソッドで yield が発生すると以下が実行されます。
block_proc(VALUE block_arg, VALUE data2, VALUE self)
block_arg はブロック引数(複数なら配列に入っている)、
data2 は rb_itera......te() に渡したもの、
self は block_proc 呼び出し時点での self です。...