種類
ライブラリ
- ビルトイン (856)
-
cgi
/ core (36) -
cgi
/ html (96) -
irb
/ cmd / help (12) -
irb
/ context (12) -
irb
/ extend-command (12) -
irb
/ input-method (72) - json (204)
-
minitest
/ unit (1) -
net
/ http (24) - rake (12)
- rdoc (12)
-
shell
/ command-processor (6) -
webrick
/ httprequest (12) -
webrick
/ httpresponse (12) - win32ole (144)
クラス
- CGI (24)
- Exception (12)
-
IRB
:: Context (12) -
IRB
:: ExtendCommand :: Help (12) -
IRB
:: FileInputMethod (12) -
IRB
:: InputMethod (12) -
IRB
:: ReadlineInputMethod (24) -
IRB
:: StdioInputMethod (24) -
JSON
:: State (12) - Method (36)
-
MiniTest
:: Unit (1) - Module (372)
- NameError (12)
-
Net
:: HTTPGenericRequest (12) - Object (60)
- Proc (12)
- Refinement (4)
- Regexp (24)
-
RubyVM
:: InstructionSequence (72) -
Shell
:: CommandProcessor (6) - String (60)
- TracePoint (12)
- UnboundMethod (96)
-
WEBrick
:: HTTPRequest (12) -
WEBrick
:: HTTPResponse (12) -
WIN32OLE
_ METHOD (96) -
WIN32OLE
_ PARAM (48)
モジュール
-
CGI
:: HtmlExtension (96) -
CGI
:: QueryExtension (12) -
IRB
:: ExtendCommandBundle (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 :: String :: Extend (12) -
JSON
:: Generator :: GeneratorMethods :: TrueClass (12) - Kernel (36)
- Marshal (24)
-
Net
:: HTTPHeader (12) - RDoc (12)
オブジェクト
- main (24)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (12) - == (12)
- Extend (24)
-
METHOD
_ MODIFIERS (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) - NoDelegateMethods (6)
- NoMethodError (12)
- Rubyで使われる記号の意味(正規表現の複雑な記号は除く) (12)
- Ruby用語集 (12)
- String (24)
-
absolute
_ path (12) -
alias
_ method (12) - arity (12)
- backtrace (12)
-
base
_ label (12) - caller (36)
- cgi (12)
- clone (12)
-
define
_ method (48) -
define
_ singleton _ method (24) -
did
_ you _ mean (12) - disasm (12)
- disassemble (12)
- dump (24)
- encode (36)
- eql? (12)
-
event
_ interface (12) - execute (12)
-
file
_ name (12) - form (48)
- generate (12)
- gets (36)
- header (12)
- helpfile (12)
- helpstring (12)
-
import
_ methods (4) - inspect (24)
-
instance
_ method (12) -
invoke
_ kind (12) - irb (12)
-
irb
_ original _ method _ name (12) -
json
_ create (12) - label (12)
-
last
_ match (24) - line (24)
-
method
_ defined? (12) -
module
_ function (36) -
multipart
_ form (48) - name (36)
- new (24)
-
ole
_ type (12) -
ole
_ type _ detail (12) - out (12)
- path (12)
- private (48)
-
private
_ class _ method (24) -
private
_ method _ defined? (12) - protected (48)
-
protected
_ method _ defined? (12) - public (48)
-
public
_ class _ method (24) -
public
_ instance _ method (12) -
public
_ method (12) -
public
_ method _ defined? (12) - puke (1)
-
rake
_ extension (12) -
rb
_ check _ convert _ type (12) - rdoc (12)
-
remove
_ method (12) -
request
_ method (36) -
return
_ type (12) -
return
_ type _ detail (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) -
singleton
_ method (12) -
source
_ location (36) -
to
_ json (108) -
to
_ json _ raw (12) -
to
_ json _ raw _ object (12) -
to
_ s (72) -
to
_ str (12) -
undef
_ method (12) -
webrick
/ cgi (12) - クラス/メソッドの定義 (12)
- リテラル (12)
検索結果
先頭5件
-
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... -
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 (9246.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......ラスメソッド
class Bar < Foo
end
p Bar.method(:foo) # => #<Method: Bar(Foo).foo() foo.rb:11>
# 以下は(形式1)の出力になる
module Baz
def baz
end
end
class <<obj
include Baz
end
p obj.method(:baz) # => #<Method: String(Baz)#baz() foo.rb:23>
//}
@see Object#inspect... -
Method
# to _ s -> String (9246.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......ラスメソッド
class Bar < Foo
end
p Bar.method(:foo) # => #<Method: Bar(Foo).foo() foo.rb:11>
# 以下は(形式1)の出力になる
module Baz
def baz
end
end
class <<obj
include Baz
end
p obj.method(:baz) # => #<Method: String(Baz)#baz() foo.rb:23>
//}
@see Object#inspect... -
Method
# inspect -> String (9234.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 (9234.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.... -
String
# encode(**options) -> String (9127.0) -
self を指定したエンコーディングに変換した文字列を作成して返します。引数 を2つ与えた場合、第二引数は変換元のエンコーディングを意味します。さもな くば self のエンコーディングが使われます。 無引数の場合は、Encoding.default_internal が nil でなければそれが変換先のエンコーディングになり、かつ :invalid => :replace と :undef => :replace が指定されたと見なされ、nil ならば変換は行われません。
...す。
: :replace => string
前述の :invalid => :replace や :undef => :replace で用いられる置換文字を指定します。デフォルトは Unicode 系のエンコーディングならば U+FFFD、それ以外では "?" です。
: :fallback => Hash | Proc | Method
未定義の文字......に対する置換文字を設定します。このオプションに与えられるオブジェクトは Hash, Proc, Method のいずれかまたは [] メソッドを持つオブジェクトです。
キーは現在のトランスコーダのソースエンコーディングで未定義の文字......ようとすると Encoding::UndefinedConversionError が発生する
str = "\u00b7\u2014"
str.encode("Windows-31J", fallback: { "\u00b7" => "\xA5".force_encoding("Windows-31J"),
"\u2014" => "\x81\x5C".force_encoding("Windows-31J") })
//}
@see String#encode!... -
String
# encode(encoding , **options) -> String (9127.0) -
self を指定したエンコーディングに変換した文字列を作成して返します。引数 を2つ与えた場合、第二引数は変換元のエンコーディングを意味します。さもな くば self のエンコーディングが使われます。 無引数の場合は、Encoding.default_internal が nil でなければそれが変換先のエンコーディングになり、かつ :invalid => :replace と :undef => :replace が指定されたと見なされ、nil ならば変換は行われません。
...す。
: :replace => string
前述の :invalid => :replace や :undef => :replace で用いられる置換文字を指定します。デフォルトは Unicode 系のエンコーディングならば U+FFFD、それ以外では "?" です。
: :fallback => Hash | Proc | Method
未定義の文字......に対する置換文字を設定します。このオプションに与えられるオブジェクトは Hash, Proc, Method のいずれかまたは [] メソッドを持つオブジェクトです。
キーは現在のトランスコーダのソースエンコーディングで未定義の文字......ようとすると Encoding::UndefinedConversionError が発生する
str = "\u00b7\u2014"
str.encode("Windows-31J", fallback: { "\u00b7" => "\xA5".force_encoding("Windows-31J"),
"\u2014" => "\x81\x5C".force_encoding("Windows-31J") })
//}
@see String#encode!... -
String
# encode(encoding , from _ encoding , **options) -> String (9127.0) -
self を指定したエンコーディングに変換した文字列を作成して返します。引数 を2つ与えた場合、第二引数は変換元のエンコーディングを意味します。さもな くば self のエンコーディングが使われます。 無引数の場合は、Encoding.default_internal が nil でなければそれが変換先のエンコーディングになり、かつ :invalid => :replace と :undef => :replace が指定されたと見なされ、nil ならば変換は行われません。
...す。
: :replace => string
前述の :invalid => :replace や :undef => :replace で用いられる置換文字を指定します。デフォルトは Unicode 系のエンコーディングならば U+FFFD、それ以外では "?" です。
: :fallback => Hash | Proc | Method
未定義の文字......に対する置換文字を設定します。このオプションに与えられるオブジェクトは Hash, Proc, Method のいずれかまたは [] メソッドを持つオブジェクトです。
キーは現在のトランスコーダのソースエンコーディングで未定義の文字......ようとすると Encoding::UndefinedConversionError が発生する
str = "\u00b7\u2014"
str.encode("Windows-31J", fallback: { "\u00b7" => "\xA5".force_encoding("Windows-31J"),
"\u2014" => "\x81\x5C".force_encoding("Windows-31J") })
//}
@see String#encode!...