1539件ヒット
[101-200件を表示]
(0.021秒)
別のキーワード
ライブラリ
- ビルトイン (629)
- csv (12)
- date (24)
- dbm (12)
- gdbm (24)
- json (288)
-
json
/ add / bigdecimal (24) -
json
/ add / complex (24) -
json
/ add / date (24) -
json
/ add / date _ time (24) -
json
/ add / exception (24) -
json
/ add / ostruct (24) -
json
/ add / range (24) -
json
/ add / rational (24) -
json
/ add / regexp (24) -
json
/ add / struct (24) -
json
/ add / symbol (24) -
json
/ add / time (24) -
net
/ http (24) - objspace (36)
- openssl (12)
- ostruct (17)
- pstore (36)
- psych (19)
-
rdoc
/ code _ object (12) -
rexml
/ document (12) - sdbm (12)
- win32ole (12)
-
yaml
/ dbm (12)
クラス
- Array (24)
- BigDecimal (24)
- CSV (12)
- Complex (24)
- DBM (12)
- Date (48)
- DateTime (24)
- Encoding (12)
- Exception (24)
- GDBM (24)
- Hash (265)
- IO (84)
-
JSON
:: Parser (12) -
JSON
:: State (48) - KeyError (16)
-
Net
:: HTTPResponse (24) - Object (72)
-
OpenSSL
:: X509 :: ExtensionFactory (12) - OpenStruct (41)
- PStore (36)
-
RDoc
:: CodeObject (12) -
REXML
:: Element (12) - Range (24)
- Rational (24)
- Regexp (24)
- SDBM (12)
- String (36)
- Struct (34)
- Symbol (24)
- Thread (12)
- Time (24)
- WIN32OLE (12)
-
YAML
:: DBM (12)
モジュール
- Enumerable (26)
- GC (12)
- JSON (60)
-
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) - Marshal (24)
- ObjectSpace (48)
- Psych (19)
オブジェクト
- ENV (24)
キーワード
-
CODE
_ CLASS _ TO _ OBJ (12) -
CODE
_ TO _ OBJ (12) - Hash (24)
-
NEWS for Ruby 2
. 3 . 0 (10) - RHASH (12)
- Ruby用語集 (12)
-
SCRIPT
_ LINES _ _ (12) - [] (36)
-
_ jisx0301 (12) -
_ strptime (12) - aliases (12)
- collect (14)
- context (12)
-
count
_ nodes (12) -
count
_ objects (12) -
count
_ objects _ size (12) -
count
_ tdata _ objects (12) -
create
_ extension (12) - default (24)
- delete (36)
- dig (40)
- dump (24)
- encode (36)
- eql? (12)
- fetch (60)
-
fetch
_ values (20) -
from
_ state (12) - generate (12)
-
group
_ by (12) -
handle
_ interrupt (12) - index (7)
- instance (12)
- invoke (12)
-
is
_ a? (12) -
json
_ create (156) - key (20)
- keys (12)
-
kind
_ of? (12) -
latest
_ gc _ info (12) - map (14)
- new (24)
- popen (84)
-
pretty
_ generate (12) -
pretty
_ unparse (12) -
rb
_ f _ hash (12) - receiver (8)
- reject (96)
- reject! (24)
-
ruby 1
. 6 feature (12) -
safe
_ load (19) - shift (12)
- store (12)
-
to
_ h (19) -
to
_ hash (24) -
to
_ json (252) -
to
_ json _ raw (12) -
to
_ json _ raw _ object (12) -
try
_ convert (12) - unparse (12)
- values (12)
-
values
_ at (12)
検索結果
先頭5件
-
ObjectSpace
. # count _ tdata _ objects(result _ hash = nil) -> Hash (9320.0) -
T_DATA の種類ごとにオブジェクトの数を格納したハッシュを返します。
...t_hash 戻り値のためのハッシュを指定します。省略した場合は新
しくハッシュを作成します。result_hash の内容は上書き
されます。プローブ効果を避けるために使用します。
@raise TypeError result_hash......ドではありません。パフォー
マンスに興味のある C Ruby の開発者向けのものです。
//emlist[例][ruby]{
ObjectSpace.count_tdata_objects
# => {RubyVM::InstructionSequence=>504, :parser=>5, :barrier=>6,
# :mutex=>6, Proc=>60, RubyVM::Env=>57, Mutex=>1, Encoding=>99,
#... -
Hash
. try _ convert(obj) -> Hash | nil (9229.0) -
to_hash メソッドを用いて obj をハッシュに変換しようとします。
...to_hash メソッドを用いて obj をハッシュに変換しようとします。
何らかの理由で変換できないときには nil を返します。
このメソッドは引数がハッシュであるかどうかを調べるために使えます。
//emlist[][ruby]{
Hash.try_convert({......1=>2}) # => {1=>2}
Hash.try_convert("1=>2") # => nil
//}... -
Hash
# shift -> [object , object] | nil (9224.0) -
ハッシュからキーが追加された順で先頭の要素をひとつ取り除き、 [key, value]という配列として返します。
...取り除かれた残りのハッシュに変更されます。
Ruby 3.2以前は、ハッシュが空の場合、デフォルト値(Hash#defaultまたはHash#default_procのブロックの値か、どちらもnilならばnil)
を返します(このとき、[key,value] という形式の値を......#=> [:cd, "all"]
p h #=> {}
p h.shift #=> nil
h1 = Hash.new("default value")
p h1 #=> {}
p h1.shift #=> "default value"
h2 = Hash.new {|*arg| arg}
p h2 #=> {}
p h2.shift #=> [{}, nil]
//}
@... -
Object
# to _ hash -> Hash (9224.0) -
オブジェクトの Hash への暗黙の変換が必要なときに内部で呼ばれます。 デフォルトでは定義されていません。
...オブジェクトの Hash への暗黙の変換が必要なときに内部で呼ばれます。
デフォルトでは定義されていません。
説明のためここに記載してありますが、
このメソッドは実際には Object クラスには定義されていません。
必要......すべての場面で代置可能であるような、
* ハッシュそのものとみなせるようなもの
という厳しいものになっています。
//emlist[][ruby]{
class Foo
def to_hash
{'as' => 24}
end
end
it = Foo.new
p({:as => 12}.merge(it)) #=> {"as"=>24, :as=>12}
//}... -
JSON
:: Generator :: GeneratorMethods :: Array # to _ json(state _ or _ hash = nil) -> String (9213.0) -
自身から生成した JSON 形式の文字列を返します。
...から生成した JSON 形式の文字列を返します。
@param state_or_hash 生成する JSON 形式の文字列をカスタマイズするため
に JSON::State のインスタンスか、
JSON::State.new の引数と同じ Hash を......指定します。
//emlist[例][ruby]{
require "json"
[1, 2, 3].to_json # => "[1,2,3]"
//}... -
JSON
:: Generator :: GeneratorMethods :: FalseClass # to _ json(state _ or _ hash = nil) -> String (9213.0) -
自身から生成した JSON 形式の文字列を返します。
...ら生成した JSON 形式の文字列を返します。
"false" という文字列を返します。
@param state_or_hash 生成する JSON 形式の文字列をカスタマイズするため
に JSON::State のインスタンスか、
JSON::State.new......の引数と同じ Hash を
指定します。
//emlist[例][ruby]{
require "json"
false.to_json # => "false"
//}... -
JSON
:: Generator :: GeneratorMethods :: Float # to _ json(state _ or _ hash = nil) -> String (9213.0) -
自身から生成した JSON 形式の文字列を返します。
...から生成した JSON 形式の文字列を返します。
@param state_or_hash 生成する JSON 形式の文字列をカスタマイズするため
に JSON::State のインスタンスか、
JSON::State.new の引数と同じ Hash を......指定します。
//emlist[例][ruby]{
require "json"
(1.0).to_json # => "1.0"
//}... -
JSON
:: Generator :: GeneratorMethods :: Integer # to _ json(state _ or _ hash = nil) -> String (9213.0) -
自身から生成した JSON 形式の文字列を返します。
...から生成した JSON 形式の文字列を返します。
@param state_or_hash 生成する JSON 形式の文字列をカスタマイズするため
に JSON::State のインスタンスか、
JSON::State.new の引数と同じ Hash を......指定します。
//emlist[例][ruby]{
require "json"
10.to_json # => "10"
//}... -
JSON
:: Generator :: GeneratorMethods :: NilClass # to _ json(state _ or _ hash = nil) -> String (9213.0) -
自身から生成した JSON 形式の文字列を返します。
...ら生成した JSON 形式の文字列を返します。
"null" という文字列を返します。
@param state_or_hash 生成する JSON 形式の文字列をカスタマイズするため
に JSON::State のインスタンスか、
JSON::State.new の......引数と同じ Hash を
指定します。
//emlist[例][ruby]{
require "json"
nil.to_json # => "null"
//}...