ライブラリ
- ビルトイン (613)
- benchmark (12)
-
cgi
/ core (60) - csv (12)
- delegate (12)
- fiber (8)
- fiddle (36)
-
json
/ add / bigdecimal (12) -
json
/ add / complex (12) -
json
/ add / exception (12) -
json
/ add / ostruct (12) -
json
/ add / struct (12) -
minitest
/ mock (1) -
minitest
/ spec (1) -
minitest
/ unit (1) - optparse (12)
- pathname (60)
- rake (60)
-
rubygems
/ command (48) -
rubygems
/ command _ manager (24) -
rubygems
/ config _ file (12) -
rubygems
/ doc _ manager (12) -
rubygems
/ user _ interaction (108) - un (12)
- win32ole (60)
- zlib (12)
クラス
- BasicObject (48)
-
Benchmark
:: Tms (12) - BigDecimal (12)
-
CSV
:: Row (12) - Class (24)
- Complex (12)
- Delegator (12)
- Enumerator (96)
-
Enumerator
:: Chain (14) -
Enumerator
:: Lazy (72) - Exception (12)
- Fiber (12)
-
Fiddle
:: Closure (12) -
Fiddle
:: Closure :: BlockCaller (12) -
Fiddle
:: Function (12) -
Gem
:: Command (48) -
Gem
:: CommandManager (24) -
Gem
:: ConfigFile (12) -
Gem
:: DocManager (12) -
Gem
:: StreamUI (12) - Method (66)
-
MiniTest
:: Mock (1) -
MiniTest
:: Unit (1) - Module (24)
- NoMethodError (12)
- Object (121)
- OpenStruct (12)
-
OptionParser
:: ParseError (12) - Pathname (60)
- Proc (6)
-
Rake
:: Task (12) -
RubyVM
:: InstructionSequence (12) - String (12)
- Struct (12)
- UnboundMethod (12)
- WIN32OLE (60)
-
Zlib
:: GzipWriter (12)
モジュール
-
CGI
:: QueryExtension (48) -
CGI
:: QueryExtension :: Value (12) - Enumerable (91)
-
Gem
:: UserInteraction (96) - Kernel (36)
-
Rake
:: TaskManager (24)
キーワード
- % (12)
- === (8)
- [] (24)
-
_ _ send _ _ (24) -
_ getproperty (12) -
_ invoke (12) -
_ setproperty (12) -
add
_ extra _ args (12) - alert (12)
-
alert
_ error (12) -
alert
_ warning (12) - allocate (12)
- ask (12)
-
ask
_ yes _ no (12) -
bind
_ call (12) - call (48)
-
choose
_ from _ list (12) -
class
_ exec (12) -
create
_ rule (12) - curry (22)
-
define
_ task (12) - each (62)
-
each
_ line (24) -
each
_ with _ index (24) -
each
_ with _ object (24) - entries (12)
-
enum
_ for (48) - execute (12)
- expect (1)
-
file
_ create (12) - fnmatch (12)
- fnmatch? (12)
- force (12)
- format (12)
- handles? (12)
-
has
_ key? (12) - include? (12)
- initialize (12)
-
instance
_ exec (12) - invoke (24)
- key? (12)
- keys (12)
-
method
_ missing (36) - mkmf (12)
-
module
_ exec (12) -
must
_ raise (1) - new (12)
-
next
_ values (12) - open (12)
- printf (12)
-
process
_ args (13) -
progress
_ reporter (12) -
public
_ send (24) - push (12)
- recover (12)
-
respond
_ to _ missing? (12) -
ruby2
_ keywords (6) - rule (12)
- run (12)
-
run
_ rdoc (12) - say (12)
- send (24)
-
terminate
_ interaction (12) -
to
_ a (24) -
to
_ enum (48) -
to
_ h (19) -
to
_ json (60) - transfer (12)
-
with
_ index (24) -
with
_ object (24)
検索結果
先頭5件
-
Kernel
# file _ create(*args) { . . . } -> Rake :: FileCreationTask (6302.0) -
ファイルを作成するタスクを定義します。
...ファイルを作成するタスクを定義します。
主に Kernel.#directory を定義するために使用します。... -
Fiddle
:: Function # call(*args) -> Integer|DL :: CPtr|nil (6274.0) -
関数を呼び出します。
...関数を呼び出します。
Fiddle::Function.new で指定した引数と返り値の型に基いて
Ruby のオブジェクトを適切に C のデータに変換して C の関数を呼び出し、
その返り値を Ruby のオブジェクトに変換して返します。
引数の変換は......以下の通りです。
: void* (つまり任意のポインタ型)
nil ならば C の NULL に変換されます
Fiddle::Pointer は保持している C ポインタに変換されます。
文字列であればその先頭ポインタになります。
IO オブジェクトであれば......(unsigned) char/short/int/long/long long
Ruby の整数を C の整数に変換します。
: double/float
Ruby の整数 or 浮動小数点数を C の浮動小数点数に変換します
返り値の変換は以下の通りです。
: void
nil を返します
: (unsigned) char/short/i... -
Enumerator
# each(*args) -> Enumerator (6241.0) -
生成時のパラメータに従ってブロックを繰り返します。 *args を渡した場合は、生成時のパラメータ内引数末尾へ *args を追加した状態で繰り返します。 ブロック付きで呼び出された場合は、 生成時に指定したイテレータの戻り値をそのまま返します。
...します。
*args を渡した場合は、生成時のパラメータ内引数末尾へ *args を追加した状態で繰り返します。
ブロック付きで呼び出された場合は、
生成時に指定したイテレータの戻り値をそのまま返します。
@param args 末尾へ追......Ruby Hacker"
enum = Enumerator.new {|y| str.scan(/\w+/) {|w| y << w }}
enum.each {|word| p word } # => "Yet"
# "Another"
# "Ruby"
# "Hacker"
str.scan(/\w+/......# "Hacker"
//}
//emlist[例2][ruby]{
"Hello, world!".scan(/\w+/) # => ["Hello", "world"]
"Hello, world!".to_enum(:scan, /\w+/).to_a # => ["Hello", "world"]
"Hello, world!".to_enum(:scan).each(/\w+/).to_a # => ["Hello", "world"]
obj = Object.new
def obj.each_arg(a, b... -
Enumerator
# each(*args) { . . . } -> object (6241.0) -
生成時のパラメータに従ってブロックを繰り返します。 *args を渡した場合は、生成時のパラメータ内引数末尾へ *args を追加した状態で繰り返します。 ブロック付きで呼び出された場合は、 生成時に指定したイテレータの戻り値をそのまま返します。
...します。
*args を渡した場合は、生成時のパラメータ内引数末尾へ *args を追加した状態で繰り返します。
ブロック付きで呼び出された場合は、
生成時に指定したイテレータの戻り値をそのまま返します。
@param args 末尾へ追......Ruby Hacker"
enum = Enumerator.new {|y| str.scan(/\w+/) {|w| y << w }}
enum.each {|word| p word } # => "Yet"
# "Another"
# "Ruby"
# "Hacker"
str.scan(/\w+/......# "Hacker"
//}
//emlist[例2][ruby]{
"Hello, world!".scan(/\w+/) # => ["Hello", "world"]
"Hello, world!".to_enum(:scan, /\w+/).to_a # => ["Hello", "world"]
"Hello, world!".to_enum(:scan).each(/\w+/).to_a # => ["Hello", "world"]
obj = Object.new
def obj.each_arg(a, b... -
Module
# class _ exec(*args) {|*vars| . . . } -> object (6237.0) -
与えられたブロックを指定された args を引数としてモジュールのコンテキストで評価します。
...与えられたブロックを指定された args を引数としてモジュールのコンテキストで評価します。
モジュールのコンテキストで評価するとは、実行中そのモジュールが self になるということです。
つまり、そのモジュールの......ります。
@param args ブロックに渡す引数を指定します。
//emlist[例][ruby]{
class Thing
end
c = 1
Thing.class_exec{
def hello()
"Hello there!"
end
define_method(:foo) do # ローカル変数がブロックの外側を参照している
c
end
}
t = Thing.n......ew
p t.hello() #=> "Hello there!"
p t.foo() #=> 1
//}
@see Module#module_eval, Module#class_eval... -
Module
# module _ exec(*args) {|*vars| . . . } -> object (6237.0) -
与えられたブロックを指定された args を引数としてモジュールのコンテキストで評価します。
...与えられたブロックを指定された args を引数としてモジュールのコンテキストで評価します。
モジュールのコンテキストで評価するとは、実行中そのモジュールが self になるということです。
つまり、そのモジュールの......ります。
@param args ブロックに渡す引数を指定します。
//emlist[例][ruby]{
class Thing
end
c = 1
Thing.class_exec{
def hello()
"Hello there!"
end
define_method(:foo) do # ローカル変数がブロックの外側を参照している
c
end
}
t = Thing.n......ew
p t.hello() #=> "Hello there!"
p t.foo() #=> 1
//}
@see Module#module_eval, Module#class_eval... -
Object
# public _ send(name , *args) -> object (6231.0) -
オブジェクトの public メソッド name を args を引数にして呼び出し、メソッ ドの実行結果を返します。
...オブジェクトの public メソッド name を args を引数にして呼び出し、メソッ
ドの実行結果を返します。
ブロック付きで呼ばれたときはブロックもそのまま引き渡します。
//emlist[][ruby]{
1.public_send(:+, 2) # => 3
//}
@param name 文字......列かSymbol で指定するメソッド名です。
@param args 呼び出すメソッドに渡す引数です。
@raise ArgumentError name を指定しなかった場合に発生します。
@raise NoMethodError protected メソッドや private メソッドに対して実行......した場合に発生します。
//emlist[][ruby]{
1.public_send(:puts, "hello") # => NoMethodError
//}
@see BasicObject#__send__, Object#send... -
Object
# public _ send(name , *args) { . . . . } -> object (6231.0) -
オブジェクトの public メソッド name を args を引数にして呼び出し、メソッ ドの実行結果を返します。
...オブジェクトの public メソッド name を args を引数にして呼び出し、メソッ
ドの実行結果を返します。
ブロック付きで呼ばれたときはブロックもそのまま引き渡します。
//emlist[][ruby]{
1.public_send(:+, 2) # => 3
//}
@param name 文字......列かSymbol で指定するメソッド名です。
@param args 呼び出すメソッドに渡す引数です。
@raise ArgumentError name を指定しなかった場合に発生します。
@raise NoMethodError protected メソッドや private メソッドに対して実行......した場合に発生します。
//emlist[][ruby]{
1.public_send(:puts, "hello") # => NoMethodError
//}
@see BasicObject#__send__, Object#send... -
UnboundMethod
# bind _ call(recv , *args) -> object (6231.0) -
self を recv に bind して args を引数として呼び出します。
...self を recv に bind して args を引数として呼び出します。
self.bind(recv).call(*args) と同じ意味です。
//emlist[][ruby]{
puts Kernel.instance_method(:inspect).bind_call(BasicObject.new) # => #<BasicObject:0x000055c65e8ea7b8>
//}
@see UnboundMethod#bind, Method#call...