1102件ヒット
[1-100件を表示]
(0.170秒)
ライブラリ
- ビルトイン (499)
-
cgi
/ core (24) -
cgi
/ html (96) - delegate (24)
-
irb
/ input-method (84) - json (144)
-
minitest
/ spec (1) -
minitest
/ unit (2) -
net
/ http (24) - openssl (12)
-
rdoc
/ top _ level (12) -
webrick
/ httprequest (12) -
webrick
/ httpresponse (12) -
webrick
/ httpservlet / abstract (12) - win32ole (144)
クラス
- CGI (12)
- Delegator (24)
- Exception (12)
-
IRB
:: FileInputMethod (12) -
IRB
:: InputMethod (12) -
IRB
:: ReadlineInputMethod (24) -
IRB
:: StdioInputMethod (36) -
JSON
:: State (12) - Method (36)
-
MiniTest
:: Unit (1) - Module (144)
- NameError (12)
-
Net
:: HTTPGenericRequest (12) - Object (61)
-
OpenSSL
:: Engine (12) - Proc (12)
-
RDoc
:: TopLevel (12) - Regexp (24)
-
RubyVM
:: InstructionSequence (72) - String (60)
- TracePoint (31)
- UnboundMethod (36)
-
WEBrick
:: HTTPRequest (12) -
WEBrick
:: HTTPResponse (12) -
WEBrick
:: HTTPServlet :: AbstractServlet (12) -
WIN32OLE
_ METHOD (96) -
WIN32OLE
_ PARAM (48)
モジュール
-
CGI
:: HtmlExtension (96) -
CGI
:: QueryExtension (12) -
JSON
:: Generator :: GeneratorMethods :: Array (12) -
JSON
:: Generator :: GeneratorMethods :: FalseClass (12) -
JSON
:: Generator :: GeneratorMethods :: Float (12) -
JSON
:: Generator :: GeneratorMethods :: Hash (12) -
JSON
:: Generator :: GeneratorMethods :: Integer (12) -
JSON
:: Generator :: GeneratorMethods :: NilClass (12) -
JSON
:: Generator :: GeneratorMethods :: Object (12) -
JSON
:: Generator :: GeneratorMethods :: String (36) -
JSON
:: Generator :: GeneratorMethods :: TrueClass (12) -
MiniTest
:: Assertions (1) -
Net
:: HTTPHeader (12)
キーワード
-
absolute
_ path (12) -
assert
_ respond _ to (1) - backtrace (12)
-
base
_ label (12) -
callee
_ id (12) - encode (36)
-
event
_ interface (12) -
file
_ name (12) -
find
_ local _ symbol (12) -
first
_ lineno (12) - form (48)
- generate (12)
- gets (36)
- header (12)
- helpfile (12)
- helpstring (12)
- inspect (24)
-
instance
_ methods (12) -
invoke
_ kind (12) - label (12)
- line (24)
- match (24)
-
method
_ defined? (12) -
method
_ id (12) - methods (12)
-
module
_ function (12) -
multipart
_ form (48) -
must
_ respond _ to (1) - name (24)
-
ole
_ type (12) -
ole
_ type _ detail (12) - parameters (7)
- path (12)
- private (12)
-
private
_ instance _ methods (12) -
private
_ method _ defined? (12) -
private
_ methods (12) - protected (12)
-
protected
_ instance _ methods (12) -
protected
_ method _ defined? (12) -
protected
_ methods (24) - public (12)
-
public
_ instance _ methods (12) -
public
_ method _ defined? (12) -
public
_ methods (24) - puke (1)
-
readable
_ atfer _ eof? (12) -
request
_ method (36) -
return
_ type (12) -
return
_ type _ detail (12) - service (12)
-
set
_ default (12) -
singleton
_ methods (12) -
source
_ location (36) -
to
_ a (12) -
to
_ json (108) -
to
_ json _ raw (12) -
to
_ json _ raw _ object (12) -
to
_ s (72) -
to
_ str (12)
検索結果
先頭5件
-
Net
:: HTTPGenericRequest # method -> String (18214.0) -
リクエストの HTTP メソッドを文字列で返します。
...リクエストの HTTP メソッドを文字列で返します。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Post.new(uri.request_uri)
req.method # => "POST"
req = Net::HTTP::Get.new(uri.request_uri)
req.method # => "GET"
//}... -
Net
:: HTTPHeader # method -> String (18208.0) -
リクエストの HTTP メソッドを文字列で返します。
...リクエストの HTTP メソッドを文字列で返します。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.method # => "GET"
//}... -
Method
# inspect -> String (9239.0) -
self を読みやすい文字列として返します。
...します。
以下の形式の文字列を返します。
#<Method: klass1(klass2)#method(arg) foo.rb:2> (形式1)
klass1 は、Method#inspect では、レシーバのクラス名、
UnboundMethod#inspect では、UnboundMethod オブジェクトの生成
元となったクラス/モジ......klass2 は、実際にそのメソッドを定義しているクラス/モジュール名、
method は、メソッド名を表します。
arg は引数を表します。
「foo.rb:2」は Method#source_location を表します。
source_location が nil の場合には付きません。
//em......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 (9239.0) -
self を読みやすい文字列として返します。
...します。
以下の形式の文字列を返します。
#<Method: klass1(klass2)#method(arg) foo.rb:2> (形式1)
klass1 は、Method#inspect では、レシーバのクラス名、
UnboundMethod#inspect では、UnboundMethod オブジェクトの生成
元となったクラス/モジ......klass2 は、実際にそのメソッドを定義しているクラス/モジュール名、
method は、メソッド名を表します。
arg は引数を表します。
「foo.rb:2」は Method#source_location を表します。
source_location が nil の場合には付きません。
//em......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
# inspect -> String (9233.0) -
self を読みやすい文字列として返します。
...します。
以下の形式の文字列を返します。
#<Method: klass1(klass2)#method> (形式1)
klass1 は、Method#inspect では、レシーバのクラス名、
UnboundMethod#inspect では、UnboundMethod オブジェクトの生成
元となったクラス/モジュ......モジュール名、
method は、メソッド名を表します。
//emlist[例][ruby]{
module Foo
def foo
"foo"
end
end
class Bar
include Foo
def bar
end
end
p Bar.new.method(:foo) # => #<Method: Bar(Foo)#foo>
p Bar.new.method(:bar) # => #<Method: Bar#bar>
//}
klass......が同じ場合は以下の形式になります。
#<Method: klass1#method> (形式2)
特異メソッドに対しては、
#<Method: obj.method> (形式3)
#<Method: klass1(klass2).method> (形式4)
という形式の文字列... -
Method
# to _ s -> String (9233.0) -
self を読みやすい文字列として返します。
...します。
以下の形式の文字列を返します。
#<Method: klass1(klass2)#method> (形式1)
klass1 は、Method#inspect では、レシーバのクラス名、
UnboundMethod#inspect では、UnboundMethod オブジェクトの生成
元となったクラス/モジュ......モジュール名、
method は、メソッド名を表します。
//emlist[例][ruby]{
module Foo
def foo
"foo"
end
end
class Bar
include Foo
def bar
end
end
p Bar.new.method(:foo) # => #<Method: Bar(Foo)#foo>
p Bar.new.method(:bar) # => #<Method: Bar#bar>
//}
klass......が同じ場合は以下の形式になります。
#<Method: klass1#method> (形式2)
特異メソッドに対しては、
#<Method: obj.method> (形式3)
#<Method: klass1(klass2).method> (形式4)
という形式の文字列... -
WIN32OLE
_ METHOD # helpstring -> String | nil (9219.0) -
メソッドのヘルプ文字列を取得します。
...メソッドのヘルプ文字列を取得します。
helpstringは、IDEがメソッドのバルーンヘルプを表示するような場合に利用可
能な、1行程度でメソッドを説明する文字列です。
@return ヘルプ文字列を返します。未定義ならばnilを返し......ます。
tobj = WIN32OLE_TYPE.new('Microsoft Internet Controls', 'IWebBrowser')
method = WIN32OLE_METHOD.new(tobj, 'Navigate')
puts method.helpstring # => Navigates to a URL or file.... -
TracePoint
# method _ id -> Symbol | nil (9126.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#callee_id... -
Method
# source _ location -> [String , Integer] | nil (9119.0) -
ソースコードのファイル名と行番号を配列で返します。
...@see Proc#source_location
//emlist[例][ruby]{
# ------- /tmp/foo.rb ---------
class Foo
def foo; end
end
# ----- end of /tmp/foo.rb ----
require '/tmp/foo'
m = Foo.new.method(:foo) # => #<Method: Foo#foo>
m.source_location # => ["/tmp/foo.rb", 2]
method(:puts).source_location # => nil
//}... -
Module
# method _ defined?(name , inherit=true) -> bool (6370.0) -
モジュールにインスタンスメソッド name が定義されており、 かつその可視性が public または protected であるときに true を返します。
...に
true を返します。
@param name Symbol か String を指定します。
@param inherit 真を指定するとスーパークラスや include したモジュールで
定義されたメソッドも対象になります。
@see Module#public_method_defined?, Module#private_method_defi......_method_defined?
//emlist[例][ruby]{
module A
def method1() end
def protected_method1() end
protected :protected_method1
end
class B
def method2() end
def private_method2() end
private :private_method2
end
class C < B
include A
def method3() end
end
A.method_defined? :method1......> true
C.method_defined? "method1" #=> true
C.method_defined? "method2" #=> true
C.method_defined? "method2", true #=> true
C.method_defined? "method2", false #=> false
C.method_defined? "method3" #=> true
C.method_defined? "protected_method1" #=> tru... -
Module
# private _ method _ defined?(name , inherit=true) -> bool (6310.0) -
インスタンスメソッド name がモジュールに定義されており、 しかもその可視性が private であるときに true を返します。 そうでなければ false を返します。
... true を返します。
そうでなければ false を返します。
@param name Symbol か String を指定します。
@param inherit 真を指定するとスーパークラスや include したモジュールで
定義されたメソッドも対象になります。
@see Module#method......public_method_defined?, Module#protected_method_defined?
//emlist[例][ruby]{
module A
def method1() end
end
class B
private
def method2() end
end
class C < B
include A
def method3() end
end
A.method_defined? :method1 #=> true
C.private_method_defined? "method1"......#=> false
C.private_method_defined? "method2" #=> true
C.private_method_defined? "method2", true #=> true
C.private_method_defined? "method2", false #=> false
C.method_defined? "method2" #=> false
//}...