779件ヒット
[1-100件を表示]
(0.026秒)
別のキーワード
ライブラリ
- ビルトイン (434)
-
minitest
/ unit (1) - openssl (72)
- profiler (6)
クラス
- BasicObject (24)
- Method (115)
- Module (24)
- NoMethodError (9)
- Object (24)
-
OpenSSL
:: SSL :: SSLContext (60) -
OpenSSL
:: X509 :: Store (12) - Proc (32)
- TracePoint (43)
- UnboundMethod (18)
モジュール
- Kernel (109)
-
MiniTest
:: Assertions (1)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (12) - << (14)
- === (8)
- >> (14)
- Method (12)
-
NEWS for Ruby 2
. 1 . 0 (12) -
NEWS for Ruby 2
. 2 . 0 (11) -
NEWS for Ruby 2
. 3 . 0 (10) -
NEWS for Ruby 2
. 5 . 0 (8) -
NEWS for Ruby 2
. 6 . 0 (7) -
NEWS for Ruby 2
. 7 . 0 (6) -
NEWS for Ruby 3
. 0 . 0 (5) - Proc (12)
-
Profiler
_ _ (6) - Rubyで使われる記号の意味(正規表現の複雑な記号は除く) (12)
- UnboundMethod (12)
- [] (12)
-
_ _ callee _ _ (12) -
assert
_ respond _ to (1) - bind (6)
-
bind
_ call (12) - bmcall (12)
-
callee
_ id (12) - caller (36)
- clone (12)
- curry (22)
- fail (12)
-
instance
_ eval (24) -
instance
_ method (12) - lambda (18)
- lambda? (12)
-
method
_ call (12) -
method
_ id (12) - new (12)
- parameters (7)
-
private
_ call? (9) - proc (19)
- raise (12)
-
rb
_ call (12) - rdoc (12)
-
rdoc
/ parser / c (12) -
rexml
/ parsers / sax2parser (12) -
ruby 1
. 6 feature (12) -
ruby 1
. 8 . 4 feature (12) -
ruby 1
. 9 feature (12) -
ruby2
_ keywords (18) -
session
_ get _ cb= (12) -
session
_ new _ cb= (12) -
session
_ remove _ cb= (12) -
singleton
_ method (12) -
super
_ method (11) -
tmp
_ dh _ callback= (12) -
to
_ proc (12) - umcall (12)
-
umethod
_ call (12) -
verify
_ callback= (24) - xmlrpc (3)
- クラス/メソッドの定義 (12)
- メソッド呼び出し(super・ブロック付き・yield) (12)
- 制御構造 (12)
- 手続きオブジェクトの挙動の詳細 (12)
検索結果
先頭5件
-
static VALUE method
_ call(int argc , VALUE *argv , VALUE method) (32300.0) -
-
Method
# call(*args) -> object (24126.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 (24126.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 (24120.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 (24120.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"
//}... -
Object
# method(name) -> Method (18254.0) -
オブジェクトのメソッド name をオブジェクト化した Method オブジェクトを返します。
...した
Method オブジェクトを返します。
@param name メソッド名をSymbol またはStringで指定します。
@raise NameError 定義されていないメソッド名を引数として与えると発生します。
//emlist[][ruby]{
me = -365.method(:abs)
p me #=> #<Method: Integer#......abs>
p me.call #=> 365
//}
@see Module#instance_method, Method, BasicObject#__send__, Object#send, Kernel.#eval, Object#singleton_method... -
Method
# super _ method -> Method | nil (15290.0) -
self 内で super を実行した際に実行されるメソッドを Method オブジェ クトにして返します。
...ッドを Method オブジェ
クトにして返します。
@see UnboundMethod#super_method
//emlist[例][ruby]{
class Super
def foo
"superclass method"
end
end
class Sub < Super
def foo
"subclass method"
end
end
m = Sub.new.method(:foo) # => #<Method: Sub#foo>
m.call # => "subc......lass method"
m.super_method # => #<Method: Super#foo>
m.super_method.call # => "superclass method"
//}... -
static VALUE umethod
_ call(int argc , VALUE *argv , VALUE method) (12300.0) -
-
Method
# <<(callable) -> Proc (9166.0) -
self と引数を合成した Proc を返します。
...まず受け取った引数を callable に渡して呼び出し、
その戻り値を self に渡して呼び出した結果を返します。
Method#>> とは呼び出しの順序が逆になります。
@param callable Proc、Method、もしくは任意の call メソッドを持ったオブジ......) * (3 + 3)
p (method(:f) << method(:g)).call(3) # => 36
//}
//emlist[call を定義したオブジェクトを渡す例][ruby]{
class WordScanner
def self.call(str)
str.scan(/\w+/)
end
end
File.write('testfile', <<~TEXT)
Hello, World!
Hello, Ruby!
TEXT
pipeline = method(:pp) << WordS......canner << File.method(:read)
pipeline.call('testfile') # => ["Hello", "World", "Hello", "Ruby"]
//}
@see Proc#<<, Proc#>>... -
Method
# >>(callable) -> Proc (9166.0) -
self と引数を合成した Proc を返します。
...数を self に渡して呼び出し、
その戻り値を callable に渡して呼び出した結果を返します。
Method#<< とは呼び出しの順序が逆になります。
@param callable Proc、Method、もしくは任意の call メソッドを持ったオブジェクト。
//emlist[......(3 * 3)
p (method(:f) >> method(:g)).call(3) # => 18
//}
//emlist[call を定義したオブジェクトを渡す例][ruby]{
class WordScanner
def self.call(str)
str.scan(/\w+/)
end
end
File.write('testfile', <<~TEXT)
Hello, World!
Hello, Ruby!
TEXT
pipeline = File.method(:read) >> W......ordScanner >> method(:pp)
pipeline.call('testfile') # => ["Hello", "World", "Hello", "Ruby"]
//}
@see Proc#<<, Proc#>>... -
Method
# clone -> Method (9147.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"
//}... -
UnboundMethod
# bind _ call(recv , *args) -> object (9132.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...