ライブラリ
- ビルトイン (264)
- abbrev (11)
-
cgi
/ core (33) - csv (22)
- dbm (11)
- erb (14)
- forwardable (44)
- gdbm (11)
- json (121)
-
json
/ add / bigdecimal (11) -
json
/ add / complex (11) -
json
/ add / date (11) -
json
/ add / date _ time (11) -
json
/ add / exception (11) -
json
/ add / ostruct (11) -
json
/ add / range (11) -
json
/ add / rational (11) -
json
/ add / regexp (11) -
json
/ add / struct (11) -
json
/ add / symbol (11) -
json
/ add / time (11) -
net
/ http (33) - openssl (22)
- rake (22)
-
rdoc
/ context (11) -
rdoc
/ text (11) -
rexml
/ document (33) -
rubygems
/ remote _ fetcher (11) -
webrick
/ httprequest (11) -
yaml
/ dbm (11)
クラス
- Array (11)
- BigDecimal (11)
- CGI (22)
-
CSV
:: Table (22) - Complex (11)
- DBM (11)
- Date (11)
- DateTime (11)
- ERB (14)
- Exception (11)
- GDBM (11)
-
Gem
:: RemoteFetcher (11) - Hash (22)
- Object (11)
-
OpenSSL
:: X509 :: ExtensionFactory (22) - OpenStruct (11)
-
RDoc
:: Context (11) -
REXML
:: Attributes (11) -
REXML
:: DocType (11) -
REXML
:: Element (11) -
Rake
:: TaskArguments (22) - Range (11)
- Rational (11)
- Regexp (22)
- String (220)
- Struct (11)
- Symbol (11)
- Time (11)
-
WEBrick
:: HTTPRequest (11) -
YAML
:: DBM (11)
モジュール
-
CGI
:: QueryExtension (11) - Forwardable (22)
-
JSON
:: Generator :: GeneratorMethods :: Array (11) -
JSON
:: Generator :: GeneratorMethods :: FalseClass (11) -
JSON
:: Generator :: GeneratorMethods :: Float (11) -
JSON
:: Generator :: GeneratorMethods :: Hash (11) -
JSON
:: Generator :: GeneratorMethods :: Integer (11) -
JSON
:: Generator :: GeneratorMethods :: NilClass (11) -
JSON
:: Generator :: GeneratorMethods :: Object (11) -
JSON
:: Generator :: GeneratorMethods :: String (33) -
JSON
:: Generator :: GeneratorMethods :: TrueClass (11) -
Net
:: HTTPHeader (33) -
RDoc
:: Text (11) - SingleForwardable (22)
キーワード
- % (11)
- abbrev (11)
-
add
_ element (11) -
create
_ extension (22) - delegate (22)
- encode (33)
- entities (11)
- eql? (11)
- fetch (44)
-
fetch
_ path (11) - gsub (44)
- gsub! (44)
- header (11)
- inspect (22)
-
instance
_ delegate (11) -
named
_ captures (11) - namespaces (11)
- out (11)
- params (11)
- query (11)
- reject (11)
- result (7)
-
result
_ with _ hash (7) - select (11)
-
single
_ delegate (11) -
strip
_ hashes (11) - sub (33)
- sub! (33)
-
to
_ csv (11) -
to
_ json (231) -
to
_ json _ raw (11) -
to
_ json _ raw _ object (11) -
to
_ s (33) -
unmatched
_ alias _ lists (11)
検索結果
先頭5件
-
String
# gsub!(pattern) {|matched| . . . . } -> self | nil (21019.0) -
文字列中で pattern にマッチする部分全てを順番にブロックに渡し、 その評価結果に置き換えます。
...は全く同じ文字列にだけマッチする
@return 置換した場合は self、置換しなかった場合は nil
//emlist[例][ruby]{
str = 'abcabc'
str.gsub!(/b/) {|s| s.upcase }
p str #=> "aBcaBc"
str = 'abcabc'
str.gsub!(/b/) { $&.upcase }
p str #=> "aBcaBc"
//}
@see String#sub... -
String
# sub!(pattern) {|matched| . . . . } -> self | nil (21018.0) -
文字列中で pattern にマッチした最初の部分をブロックに渡し、 その評価結果へ破壊的に置き換えます。
...は全く同じ文字列にだけマッチする
@return 置換した場合は self、置換しなかった場合は nil
//emlist[例][ruby]{
str = 'abcabc'
str.sub!(/b/) {|s| s.upcase }
p str #=> "aBcabc"
str = 'abcabc'
str.sub!(/b/) { $&.upcase }
p str #=> "aBcabc"
//}
@see String#gsub... -
Object
# hash -> Integer (18202.0) -
オブジェクトのハッシュ値を返します。このハッシュ値は、Object#eql? と合わせて Hash クラスで、2つのオブジェクトを同一のキーとするか判定するために用いられます。
...オブジェクトのハッシュ値を返します。このハッシュ値は、Object#eql? と合わせて Hash クラスで、2つのオブジェクトを同一のキーとするか判定するために用いられます。
2つのオブジェクトのハッシュ値が異なるとき、直ち......eql?(B) ならば A.hash == B.hash
の関係が満たされている必要があります。
ただし、ハッシュのキーとして Integer, Symbol, String などの特定の組み込みクラスが使われるときは、組込みのハッシュ関数が使用され、hash メソッドは呼......t[][ruby]{
p self.hash #=> 2013505522753096494
p 0.hash #=> 2647535320520409998
p 0.0.hash #=> -2975129765814025835
p nil.hash #=> 2401531420355998067
p "ruby".hash #=> 4460896024486900438
p "ruby".hash #=> 4460896024486900438
p :ruby.hash #=> 3979895509189707770
p :ruby.hash #=> 39798955091... -
Hash
# inspect -> String (9103.0) -
ハッシュの内容を人間に読みやすい文字列にして返します。
ハッシュの内容を人間に読みやすい文字列にして返します。
//emlist[例][ruby]{
h = { "c" => 300, "a" => 100, "d" => 400 }
h.inspect # => "{\"c\"=>300, \"a\"=>100, \"d\"=>400}"
//} -
Hash
# to _ s -> String (9103.0) -
ハッシュの内容を人間に読みやすい文字列にして返します。
ハッシュの内容を人間に読みやすい文字列にして返します。
//emlist[例][ruby]{
h = { "c" => 300, "a" => 100, "d" => 400 }
h.inspect # => "{\"c\"=>300, \"a\"=>100, \"d\"=>400}"
//} -
ERB
# result _ with _ hash(hash) -> String (6310.0) -
ERB をハッシュオブジェクトで指定されたローカル変数を持つ 新しいトップレベルバインディングで実行し、結果の文字列を返します。
...ERB をハッシュオブジェクトで指定されたローカル変数を持つ
新しいトップレベルバインディングで実行し、結果の文字列を返します。
@param hash ローカル変数名をキーにしたハッシュ
@see ERB#result... -
RDoc
:: Text # strip _ hashes(text) -> String (6202.0) -
引数から各行の行頭の # を削除します。
引数から各行の行頭の # を削除します。
@param text 文字列を指定します。 -
JSON
:: Generator :: GeneratorMethods :: Hash # to _ json(state _ or _ hash = nil) -> String (3215.0) -
自身から生成した JSON 形式の文字列を返します。
...の文字列を返します。
@param state_or_hash 生成する JSON 形式の文字列をカスタマイズするため
に JSON::State のインスタンスか、
JSON::State.new の引数と同じ Hash を
指定します。
//emli... -
JSON
:: Generator :: GeneratorMethods :: String # to _ json(state _ or _ hash = nil) -> String (3215.0) -
自身から生成した JSON 形式の文字列を返します。
...返すことがあります。
@param state_or_hash 生成する JSON 形式の文字列をカスタマイズするため
に JSON::State のインスタンスか、
JSON::State.new の引数と同じ Hash を
指定します。
//emli... -
JSON
:: Generator :: GeneratorMethods :: String # to _ json _ raw -> String (3146.0) -
自身に対して JSON::Generator::GeneratorMethods::String#to_json_raw_object を呼び出して JSON::Generator::GeneratorMethods::Hash#to_json した結果を返します。
...自身に対して JSON::Generator::GeneratorMethods::String#to_json_raw_object を呼び出して JSON::Generator::GeneratorMethods::Hash#to_json した結果を返します。
@see JSON::Generator::GeneratorMethods::String#to_json_raw_object, JSON::Generator::GeneratorMethods::Hash#to_json...