ライブラリ
- ビルトイン (214)
- forwardable (24)
- json (12)
- monitor (12)
- psych (19)
- thread (2)
- tsort (23)
-
webrick
/ httpstatus (12) -
webrick
/ httputils (12) - win32ole (12)
クラス
- Array (12)
- Class (4)
- Method (44)
- Module (48)
- NilClass (12)
- Struct (48)
-
WEBrick
:: HTTPUtils :: FormData (12) -
WIN32OLE
_ TYPE (12)
モジュール
- Enumerable (24)
- Forwardable (24)
- JSON (12)
- Psych (19)
- TSort (23)
-
WEBrick
:: HTTPStatus (12)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (12) - === (8)
- ConditionVariable (12)
- Marshal フォーマット (12)
- MonitorMixin (12)
-
NEWS for Ruby 2
. 7 . 0 (6) -
NEWS for Ruby 3
. 1 . 0 (4) - Numeric (12)
- Rubyで使われる記号の意味(正規表現の複雑な記号は除く) (12)
- call (24)
-
const
_ source _ location (12) - constants (12)
-
def
_ delegator (12) -
def
_ instance _ delegator (12) -
default
_ event _ sources (12) -
each
_ strongly _ connected _ component _ from (23) - new (36)
-
prepend
_ features (12) -
rexml
/ parsers / sax2parser (12) -
rexml
/ parsers / streamparser (12) -
ruby 1
. 6 feature (12) -
ruby 1
. 8 . 3 feature (12) -
ruby 1
. 9 feature (12) -
safe
_ load (19) -
sort
_ by (24) - subclasses (4)
-
to
_ a (12) - tsort (12)
-
undef
_ method (12) -
webrick
/ cgi (12) - クラス/メソッドの定義 (12)
- パターンマッチ (12)
- 演算子式 (12)
検索結果
先頭5件
-
WEBrick
:: HTTPStatus . [](code) -> Class (18201.0) -
指定された整数が表すステータスコードに対応する WEBrick::HTTPStatus::Status のサブクラスを返します。
指定された整数が表すステータスコードに対応する WEBrick::HTTPStatus::Status
のサブクラスを返します。
@param code HTTP のステータスコードを表す整数を指定します。
require 'webrick'
p WEBrick::HTTPStatus[200] #=> WEBrick::HTTPStatus::OK -
Method
# [](*args) -> object (18118.0) -
メソッドオブジェクトに封入されているメソッドを起動します。
...やブロックはそのままメソッドに渡されます。
self[] の形の呼び出しは通常のメソッド呼び出しに見た目を
近付けるためだけに用意されたもので、Array#[]のような
他の [] メソッドとの意味的な関連性はありません。
@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"
//}... -
JSON
. [](object , options) -> object (18112.0) -
文字列のように扱えるデータを受け取った場合は Ruby のオブジェクトに変換して返します。 そうでない場合は JSON に変換して返します。
...":2, "c":3 }
JSON
hash = { a: 1, b: 2, c: 3 }
JSON[string].class # => Hash
JSON[string] # => {"a"=>1, "b"=>2, "c"=>3}
JSON[string, symbolize_names: true] # => {:a=>1, :b=>2, :c=>3}
JSON[hash].class # => String
JSON[hash]... -
Array
. [](*item) -> Array (18106.0) -
引数 item を要素として持つ配列を生成して返します。
...したときに、そのサブクラスのインスタンスを作成
しやすくするために用意されている。
@param item 配列の要素を指定します。
//emlist[例][ruby]{
Array[1, 2, 3] #=> [1, 2, 3]
class SubArray < Array
# ...
end
p SubArray[1, 2, 3] # => [1, 2, 3]
//}... -
WEBrick
:: HTTPUtils :: FormData # [](header) -> String | nil (18106.0) -
自身が multipart/form-data なデータの場合に、header で指定された ヘッダの値を文字列で返します。無ければ nil を返します。
...nil を返します。
@param header ヘッダ名を文字列で指定します。大文字と小文字を区別しません。
例:
require "webrick/cgi"
class MyCGI < WEBrick::CGI
def do_GET(req, res)
p req.query['q']['content-type'] #=> "plain/text"
end
end
MyCGI.new.start()... -
Struct
. [](*args) -> Struct (18103.0) -
(このメソッドは Struct の下位クラスにのみ定義されています) 構造体オブジェクトを生成して返します。
(このメソッドは Struct の下位クラスにのみ定義されています)
構造体オブジェクトを生成して返します。
@param args 構造体の初期値を指定します。メンバの初期値は指定されなければ nil です。
@return 構造体クラスのインスタンス。
@raise ArgumentError 構造体のメンバの数よりも多くの引数を指定した場合に発生します。
//emlist[例][ruby]{
Foo = Struct.new(:foo, :bar)
foo = Foo.new(1)
p foo.values # => [1, nil]
//} -
Class
# subclasses -> [Class] (15237.0) -
自身が直接のスーパークラスになっている(特異クラスを除く)クラスの配列を返します。 返り値の配列の順序は未定義です。
...を除く)クラスの配列を返します。
返り値の配列の順序は未定義です。
//emlist[例][ruby]{
class A; end
class B < A; end
class C < B; end
class D < A; end
A.subclasses # => [D, B]
B.subclasses # => [C]
C.subclasses # => []
//}
@see Class#superclass... -
Method
# [](*args) -> object (15118.0) -
メソッドオブジェクトに封入されているメソッドを起動します。
...やブロックはそのままメソッドに渡されます。
self[] の形の呼び出しは通常のメソッド呼び出しに見た目を
近付けるためだけに用意されたもので、Array#[]のような
他の [] メソッドとの意味的な関連性はありません。
@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"
//}......args self に渡される引数。
@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......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"
//}... -
Struct
. new(*args) {|subclass| block } -> Class (3208.0) -
Struct クラスに新しいサブクラスを作って、それを返します。
...ing # => "Hello Dave!"
//}
Structをカスタマイズする場合はこの方法が推奨されます。無名クラスのサブ
クラスを作成する方法でカスタマイズする場合は無名クラスが使用されなくなっ
てしまうことがあるためです。
@see Class.new... -
Struct
. new(*args , keyword _ init: false) {|subclass| block } -> Class (3208.0) -
Struct クラスに新しいサブクラスを作って、それを返します。
...ing # => "Hello Dave!"
//}
Structをカスタマイズする場合はこの方法が推奨されます。無名クラスのサブ
クラスを作成する方法でカスタマイズする場合は無名クラスが使用されなくなっ
てしまうことがあるためです。
@see Class.new... -
Struct
. new(*args , keyword _ init: nil) {|subclass| block } -> Class (3208.0) -
Struct クラスに新しいサブクラスを作って、それを返します。
...ing # => "Hello Dave!"
//}
Structをカスタマイズする場合はこの方法が推奨されます。無名クラスのサブ
クラスを作成する方法でカスタマイズする場合は無名クラスが使用されなくなっ
てしまうことがあるためです。
@see Class.new... -
Struct
. new(*args) -> Class (3108.0) -
Struct クラスに新しいサブクラスを作って、それを返します。
...ing # => "Hello Dave!"
//}
Structをカスタマイズする場合はこの方法が推奨されます。無名クラスのサブ
クラスを作成する方法でカスタマイズする場合は無名クラスが使用されなくなっ
てしまうことがあるためです。
@see Class.new... -
Struct
. new(*args , keyword _ init: false) -> Class (3108.0) -
Struct クラスに新しいサブクラスを作って、それを返します。
...ing # => "Hello Dave!"
//}
Structをカスタマイズする場合はこの方法が推奨されます。無名クラスのサブ
クラスを作成する方法でカスタマイズする場合は無名クラスが使用されなくなっ
てしまうことがあるためです。
@see Class.new... -
Struct
. new(*args , keyword _ init: nil) -> Class (3108.0) -
Struct クラスに新しいサブクラスを作って、それを返します。
...ing # => "Hello Dave!"
//}
Structをカスタマイズする場合はこの方法が推奨されます。無名クラスのサブ
クラスを作成する方法でカスタマイズする場合は無名クラスが使用されなくなっ
てしまうことがあるためです。
@see Class.new...