4311件ヒット
[1-100件を表示]
(0.060秒)
別のキーワード
種類
ライブラリ
- ビルトイン (1678)
-
cgi
/ html (48) - delegate (48)
- drb (24)
- erb (60)
- forwardable (96)
-
irb
/ cmd / help (12) -
irb
/ context (24) -
irb
/ extend-command (24) -
irb
/ input-method (276) -
irb
/ output-method (96) - json (72)
-
minitest
/ spec (1) -
minitest
/ unit (1) - objspace (12)
- openssl (120)
- pp (12)
-
rdoc
/ code _ object (12) -
rdoc
/ context (36) -
rdoc
/ top _ level (12) - singleton (12)
-
webrick
/ cgi (12) -
webrick
/ httprequest (12) -
webrick
/ httpresponse (24) -
webrick
/ httpservlet / abstract (12) -
webrick
/ httpstatus (492) - win32ole (180)
クラス
- Array (10)
- BasicObject (72)
-
DRb
:: DRbServer (12) - Delegator (48)
- ERB (36)
- Enumerator (62)
-
Enumerator
:: Lazy (24) - Exception (12)
-
IRB
:: Context (24) -
IRB
:: ExtendCommand :: Help (12) -
IRB
:: FileInputMethod (36) -
IRB
:: InputMethod (48) -
IRB
:: OutputMethod (60) -
IRB
:: ReadlineInputMethod (72) -
IRB
:: StdioInputMethod (72) -
IRB
:: StdioOutputMethod (12) -
JSON
:: State (24) - Method (200)
- Module (340)
- NameError (12)
- NoMethodError (21)
- Object (217)
-
OpenSSL
:: SSL :: SSLContext (108) -
OpenSSL
:: X509 :: Store (12) - PP (12)
- Proc (44)
-
RDoc
:: CodeObject (12) -
RDoc
:: Context (36) -
RDoc
:: TopLevel (12) - Regexp (48)
-
RubyVM
:: InstructionSequence (108) - String (36)
- Thread (12)
- TracePoint (43)
- UnboundMethod (179)
-
WEBrick
:: CGI (12) -
WEBrick
:: HTTPRequest (12) -
WEBrick
:: HTTPResponse (24) -
WEBrick
:: HTTPServlet :: AbstractServlet (12) - WIN32OLE (48)
-
WIN32OLE
_ EVENT (12) -
WIN32OLE
_ METHOD (36) -
WIN32OLE
_ PARAM (60) -
WIN32OLE
_ TYPE (12)
モジュール
-
CGI
:: HtmlExtension (48) -
ERB
:: DefMethod (12) - Forwardable (48)
-
IRB
:: ExtendCommandBundle (24) -
JSON
:: Generator :: GeneratorMethods :: Object (12) -
JSON
:: Generator :: GeneratorMethods :: String (12) - Kernel (121)
- Marshal (24)
-
MiniTest
:: Assertions (1) - ObjectSpace (12)
-
RubyVM
:: AbstractSyntaxTree (10) - SingleForwardable (48)
-
WEBrick
:: HTTPStatus (480)
オブジェクト
- main (24)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (12) - << (14)
- == (24)
- === (8)
- >> (14)
- BasicObject (12)
- DRbObject (12)
- DefMethod (12)
- FileInputMethod (12)
-
INSECURE
_ METHOD (12) - InputMethod (12)
- InstructionSequence (12)
- METHODS (12)
- MethodNotAllowed (12)
-
NEWS for Ruby 2
. 0 . 0 (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) -
NEWS for Ruby 3
. 1 . 0 (4) - Object (24)
- OutputMethod (12)
- Proc (12)
-
RC
_ ACCEPTED (12) -
RC
_ BAD _ GATEWAY (12) -
RC
_ BAD _ REQUEST (12) -
RC
_ CONFLICT (12) -
RC
_ CONTINUE (12) -
RC
_ CREATED (12) -
RC
_ EXPECTATION _ FAILED (12) -
RC
_ FORBIDDEN (12) -
RC
_ FOUND (12) -
RC
_ GATEWAY _ TIMEOUT (12) -
RC
_ GONE (12) -
RC
_ HTTP _ VERSION _ NOT _ SUPPORTED (12) -
RC
_ INTERNAL _ SERVER _ ERROR (12) -
RC
_ LENGTH _ REQUIRED (12) -
RC
_ METHOD _ NOT _ ALLOWED (12) -
RC
_ MOVED _ PERMANENTLY (12) -
RC
_ MULTIPLE _ CHOICES (12) -
RC
_ NON _ AUTHORITATIVE _ INFORMATION (12) -
RC
_ NOT _ ACCEPTABLE (12) -
RC
_ NOT _ FOUND (12) -
RC
_ NOT _ IMPLEMENTED (12) -
RC
_ NOT _ MODIFIED (12) -
RC
_ NO _ CONTENT (12) -
RC
_ OK (12) -
RC
_ PARTIAL _ CONTENT (12) -
RC
_ PAYMENT _ REQUIRED (12) -
RC
_ PRECONDITION _ FAILED (12) -
RC
_ PROXY _ AUTHENTICATION _ REQUIRED (12) -
RC
_ REQUEST _ ENTITY _ TOO _ LARGE (12) -
RC
_ REQUEST _ RANGE _ NOT _ SATISFIABLE (12) -
RC
_ REQUEST _ TIMEOUT (12) -
RC
_ REQUEST _ URI _ TOO _ LARGE (12) -
RC
_ RESET _ CONTENT (12) -
RC
_ SEE _ OTHER (12) -
RC
_ SERVICE _ UNAVAILABLE (12) -
RC
_ SWITCHING _ PROTOCOLS (12) -
RC
_ TEMPORARY _ REDIRECT (12) -
RC
_ UNAUTHORIZED (12) -
RC
_ UNSUPPORTED _ MEDIA _ TYPE (12) -
RC
_ USE _ PROXY (12) -
RUBY
_ METHOD _ FUNC (12) - ReadlineInputMethod (12)
- Ruby プログラムの実行 (12)
- Rubyで使われる記号の意味(正規表現の複雑な記号は除く) (12)
- Ruby用語集 (12)
- Singleton (12)
- StdioInputMethod (12)
- StdioOutputMethod (12)
- UnboundMethod (12)
-
WIN32OLE
_ VARIABLE (12) - [] (36)
-
_ _ callee _ _ (12) -
_ _ method _ _ (12) -
_ getproperty (12) -
_ invoke (12) -
absolute
_ path (12) -
alias
_ method (4) - args (12)
- arity (24)
-
assert
_ respond _ to (1) - backtrace (12)
-
base
_ label (12) - bind (12)
-
bind
_ call (12) -
bm
_ mark (12) - bmcall (12)
- call (24)
-
callee
_ id (12) -
class
_ exec (12) -
client
_ cert _ cb= (12) - clone (12)
-
clone
_ method (12) -
count
_ nodes (12) - curry (22)
- debug (12)
-
def
_ class (12) -
def
_ delegator (24) -
def
_ delegators (24) -
def
_ erb _ method (12) -
def
_ instance _ delegator (12) -
def
_ instance _ delegators (12) -
def
_ method (12) -
def
_ module (12) -
def
_ single _ delegator (12) -
def
_ single _ delegators (12) - default (12)
-
default
_ event _ sources (12) -
define
_ method (48) -
define
_ singleton _ method (24) - dig (10)
- disasm (12)
- disassemble (12)
- dump (24)
- each (48)
- encode (36)
- encoding (36)
-
enum
_ for (36) - eof? (24)
- eql? (24)
- eval (24)
- event? (12)
- execute (12)
- fail (12)
-
file
_ name (12) -
find
_ local _ symbol (24) -
find
_ symbol (12) -
first
_ lineno (12) - form (24)
- generate (12)
- gets (48)
- handler= (12)
- hash (24)
- input? (12)
-
ins
_ methods _ i (12) -
ins
_ methods _ priv _ i (12) -
ins
_ methods _ prot _ i (12) - inspect (18)
-
install
_ alias _ method (12) -
instance
_ eval (24) -
instance
_ method (12) -
instance
_ methods (12) - io (12)
- irb (12)
-
irb
/ completion (12) -
irb
/ input-method (12) -
irb
/ output-method (12) -
irb
_ original _ method _ name (12) - label (12)
- lambda (18)
- lambda? (12)
-
last
_ match (24) - line (24)
- match (24)
- method (12)
-
method
_ defined? (12) -
method
_ id (12) -
method
_ missing (36) -
method
_ unbind (12) - methods (24)
-
module
_ exec (12) -
module
_ function (12) -
multipart
_ form (24) -
must
_ respond _ to (1) - name (36)
- new (86)
- of (22)
-
offset
_ vtbl (12) -
ole
_ show _ help (12) - optional? (12)
-
original
_ name (24) - output? (12)
- owner (12)
- parameters (43)
- path (12)
- pp (12)
- ppx (12)
- print (24)
- printn (12)
- private (48)
-
private
_ call? (9) -
private
_ instance _ methods (12) -
private
_ method _ defined? (12) -
private
_ methods (12) - proc (19)
- protected (12)
-
protected
_ instance _ methods (12) -
protected
_ method _ defined? (12) -
protected
_ methods (24) - public (48)
-
public
_ class _ method (24) -
public
_ instance _ method (12) -
public
_ instance _ methods (12) -
public
_ method (12) -
public
_ method _ defined? (12) -
public
_ methods (24) - puts (12)
- raise (12)
-
rb
_ add _ method (12) -
rb
_ call (12) -
rb
_ catch (12) -
rb
_ check _ convert _ type (12) -
rb
_ class _ instance _ methods (12) -
rb
_ class _ private _ instance _ methods (12) -
rb
_ class _ protected _ instance _ methods (12) -
rb
_ convert _ type (12) -
rb
_ define _ global _ function (12) -
rb
_ define _ method (12) -
rb
_ define _ method _ id (12) -
rb
_ define _ module _ function (12) -
rb
_ define _ private _ method (12) -
rb
_ define _ protected _ method (12) -
rb
_ define _ singleton _ method (12) -
rb
_ export _ method (12) -
rb
_ get _ method _ body (12) -
rb
_ method _ boundp (12) -
rb
_ mod _ alias _ method (12) -
rb
_ mod _ define _ method (12) -
rb
_ mod _ method (12) -
rb
_ mod _ method _ defined (12) -
rb
_ mod _ private _ method (12) -
rb
_ mod _ public _ method (12) -
rb
_ mod _ remove _ method (12) -
rb
_ mod _ undef _ method (12) -
rb
_ obj _ method (12) -
rb
_ obj _ methods (12) -
rb
_ obj _ private _ methods (12) -
rb
_ obj _ protected _ methods (12) -
rb
_ obj _ singleton _ methods (12) -
rb
_ remove _ method (12) -
rb
_ scan _ args (12) -
rb
_ to _ integer (12) -
rb
_ undef _ method (12) - rdoc (12)
-
rdoc
/ parser / ruby (12) -
readable
_ atfer _ eof? (36) - receiver (12)
-
remove
_ methods _ etc (12) -
renegotiation
_ cb= (12) -
request
_ method (24) -
request
_ method= (12) -
require
_ relative (12) -
respond
_ to? (12) -
respond
_ to _ missing? (12) - retval? (12)
-
rexml
/ parsers / sax2parser (12) -
ruby 1
. 6 feature (12) -
ruby 1
. 8 . 2 feature (12) -
ruby 1
. 8 . 3 feature (12) -
ruby 1
. 8 . 4 feature (12) -
ruby 1
. 9 feature (12) -
ruby2
_ keywords (18) - send (24)
- seplist (12)
-
servername
_ cb= (12) - service (24)
-
session
_ get _ cb= (12) -
session
_ new _ cb= (12) -
session
_ remove _ cb= (12) -
set
_ method _ visibility (12) -
set
_ visibility _ for (12) -
singleton
_ method (12) -
singleton
_ method _ added (12) -
singleton
_ method _ removed (12) -
singleton
_ method _ undefined (12) -
singleton
_ methods (12) -
source
_ location (12) -
super
_ method (11) -
tmp
_ dh _ callback= (12) -
to
_ a (12) -
to
_ enum (36) -
to
_ json (12) -
to
_ json _ raw _ object (12) -
to
_ s (18) -
umethod
_ bind (12) -
umethod
_ unbind (12) - unbind (12)
-
undef
_ method (12) -
verify
_ callback= (24) - visible? (12)
-
webrick
/ cgi (12) - クラス/メソッドの定義 (12)
- メソッド呼び出し(super・ブロック付き・yield) (12)
- リテラル (12)
- 制御構造 (12)
- 手続きオブジェクトの挙動の詳細 (12)
検索結果
先頭5件
-
Method (38094.0)
-
Object#method によりオブジェクト化され たメソッドオブジェクトのクラスです。
...Object#method によりオブジェクト化され
たメソッドオブジェクトのクラスです。
メソッドの実体(名前でなく)とレシーバの組を封入します。
Proc オブジェクトと違ってコンテキストを保持しません。
=== Proc との差
Method......、Method は何度も繰り返し生成する
場合に向くと言えます。また内包するコードの大きさという点では
Proc は小規模、Method は大規模コードに向くと言えます。
既存のメソッドを Method オブジェクト化する。
//emlist[例][ruby]{......method(:foo)
p m # => #<Method: Foo#foo>
p m.call(1) # => "foo called with arg 1"
//}
名前のないメソッド(の代わり)が必要なら Proc を使うと良い。
//emlist[例][ruby]{
pr = Proc.new {|arg|
"proc called with arg #{arg}"
}
p pr # => #<Proc:0x401b... -
Method
# unbind -> UnboundMethod (27230.0) -
self のレシーバとの関連を取り除いた UnboundMethod オブ ジェクトを生成して返します。
...除いた UnboundMethod オブ
ジェクトを生成して返します。
//emlist[例][ruby]{
class Foo
def foo
"foo"
end
end
m = Foo.new.method(:foo) # => #<Method: Foo#foo>
unbound_method = m.unbind # => #<UnboundMethod: Foo#foo>
unbound_method.bind(Foo.new) # => #<Method: Foo#foo>
//}... -
static VALUE bmcall(VALUE args
, VALUE method) (26200.0) -
-
static void bm
_ mark(struct METHOD *data) (26200.0) -
-
Method
# parameters -> [object] (21152.0) -
Method オブジェクトの引数の情報を返します。
...Method オブジェクトの引数の情報を返します。
Method オブジェクトが引数を取らなければ空の配列を返します。引数を取る場合は、配列の配列を返し、
各配列の要素は引数の種類に応じた以下のような Symbol と、仮引数の名......前を表す Symbol の 2 要素です。
組み込みのメソッドでは、仮引数の名前が取れません。
: :req
必須の引数
: :opt
デフォルト値が指定されたオプショナルな引数
: :rest
* で指定された残りすべての引数
: :keyreq
必須のキーワ......:block
& で指定されたブロック引数
//emlist[例][ruby]{
m = Class.new{define_method(:m){|x, y=42, *other, k_x:, k_y: 42, **k_other, &b|}}.instance_method(:m)
m.parameters #=> x], [:opt, :y], [:rest, :other], [:keyreq, :k_x], [:key, :k_y], [:keyrest, :k_other], [:block, :b
File.method(:... -
Method
# inspect -> String (21150.0) -
self を読みやすい文字列として返します。
...します。
以下の形式の文字列を返します。
#<Method: klass1(klass2)#method(arg) foo.rb:2> (形式1)
klass1 は、Method#inspect では、レシーバのクラス名、
UnboundMethod#inspect では、UnboundMethod オブジェクトの生成
元となったクラス/モジ......
method は、メソッド名を表します。
arg は引数を表します。
「foo.rb:2」は Method#source_location を表します。
source_location が nil の場合には付きません。
//emlist[例][ruby]{
module Foo
def foo
"foo"
end
end
class Bar
include Foo
def bar(a, b......)
end
end
p Bar.new.method(:foo) # => #<Method: Bar(Foo)#foo() test.rb:2>
p Bar.new.method(:bar) # => #<Method: Bar#bar(a, b) test.rb:8>
//}
klass1 と klass2 が同じ場合は以下の形式になります。
#<Method: klass1#method() foo.rb:2> (形式2)
特異メ... -
Method
# to _ s -> String (21150.0) -
self を読みやすい文字列として返します。
...します。
以下の形式の文字列を返します。
#<Method: klass1(klass2)#method(arg) foo.rb:2> (形式1)
klass1 は、Method#inspect では、レシーバのクラス名、
UnboundMethod#inspect では、UnboundMethod オブジェクトの生成
元となったクラス/モジ......
method は、メソッド名を表します。
arg は引数を表します。
「foo.rb:2」は Method#source_location を表します。
source_location が nil の場合には付きません。
//emlist[例][ruby]{
module Foo
def foo
"foo"
end
end
class Bar
include Foo
def bar(a, b......)
end
end
p Bar.new.method(:foo) # => #<Method: Bar(Foo)#foo() test.rb:2>
p Bar.new.method(:bar) # => #<Method: Bar#bar(a, b) test.rb:8>
//}
klass1 と klass2 が同じ場合は以下の形式になります。
#<Method: klass1#method() foo.rb:2> (形式2)
特異メ... -
Method
# <<(callable) -> Proc (21136.0) -
self と引数を合成した Proc を返します。
...llable に渡して呼び出し、
その戻り値を self に渡して呼び出した結果を返します。
Method#>> とは呼び出しの順序が逆になります。
@param callable Proc、Method、もしくは任意の call メソッドを持ったオブジェクト。
//emlist[例][ruby]......) * (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 (21136.0) -
self と引数を合成した Proc を返します。
...、
その戻り値を callable に渡して呼び出した結果を返します。
Method#<< とは呼び出しの順序が逆になります。
@param callable Proc、Method、もしくは任意の call メソッドを持ったオブジェクト。
//emlist[例][ruby]{
def f(x)
x * x
end
def......(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
# ==(other) -> bool (21124.0) -
自身と other が同じインスタンスの同じメソッドを表す場合に true を返します。そうでない場合に false を返します。
...ッドを表す場合に
true を返します。そうでない場合に false を返します。
@param other 自身と比較したいオブジェクトを指定します。
//emlist[例][ruby]{
s = "bar"
a = s.method(:size)
b = s.method(:size)
p a == b #=> true
//}... -
Method
# eql?(other) -> bool (21124.0) -
自身と other が同じインスタンスの同じメソッドを表す場合に true を返します。そうでない場合に false を返します。
...ッドを表す場合に
true を返します。そうでない場合に false を返します。
@param other 自身と比較したいオブジェクトを指定します。
//emlist[例][ruby]{
s = "bar"
a = s.method(:size)
b = s.method(:size)
p a == b #=> true
//}...