366件ヒット
[1-100件を表示]
(0.041秒)
種類
- 文書 (101)
- インスタンスメソッド (84)
- 関数 (84)
- 特異メソッド (49)
- モジュール関数 (48)
クラス
-
JSON
:: State (84) - TracePoint (11)
モジュール
- GC (26)
- JSON (24)
-
JSON
:: Generator :: GeneratorMethods :: Object (12) - Marshal (24)
キーワード
-
1
. 6 . 8から1 . 8 . 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) - [] (12)
-
boot
_ defclass (12) - dump (24)
- generate (24)
-
latest
_ gc _ info (24) - new (12)
-
object
_ nl (12) -
object
_ nl= (12) -
rb
_ false (12) -
rb
_ mod _ extend _ object (12) -
rb
_ obj _ inspect (12) -
rb
_ obj _ methods (12) -
rb
_ obj _ private _ methods (12) -
rb
_ obj _ protected _ methods (12) -
ruby 1
. 6 feature (12) -
ruby 1
. 8 . 2 feature (12) -
ruby 1
. 8 . 4 feature (12) -
ruby 1
. 9 feature (12) -
to
_ h (12) -
to
_ hash (12) -
to
_ json (12) - unparse (12)
検索結果
先頭5件
-
TracePoint
. stat -> object (18202.0) -
TracePoint の内部情報を返します。
TracePoint の内部情報を返します。
返り値の内容は実装依存です。
将来変更される可能性があります。
このメソッドは TracePoint 自身のデバッグ用です。 -
GC
. stat(key) -> Numeric (18144.0) -
GC 内部の統計情報を Hash で返します。
...します。
GC.stat
# =>
{
:count=>2,
:heap_used=>9,
:heap_length=>11,
:heap_increment=>2,
:heap_live_slot=>6836,
:heap_free_slot=>519,
:heap_final_slot=>0,
:heap_swept_slot=>818,
:total_allocated_object=>7674,
:total_freed_object=>838,
:malloc_inc......81034,
:malloc_limit=>16777216,
:minor_gc_count=>2,
:major_gc_count=>0,
:remembered_shady_object=>55,
:remembered_shady_object_limit=>0,
:old_object=>2422,
:old_object_limit=>0,
:oldmalloc_increase=>277386,
:oldmalloc_limit=>16777216
}
戻り値のハッシュ... -
GC
. stat(result _ hash = {}) -> {Symbol => Integer} (18144.0) -
GC 内部の統計情報を Hash で返します。
...します。
GC.stat
# =>
{
:count=>2,
:heap_used=>9,
:heap_length=>11,
:heap_increment=>2,
:heap_live_slot=>6836,
:heap_free_slot=>519,
:heap_final_slot=>0,
:heap_swept_slot=>818,
:total_allocated_object=>7674,
:total_freed_object=>838,
:malloc_inc......81034,
:malloc_limit=>16777216,
:minor_gc_count=>2,
:major_gc_count=>0,
:remembered_shady_object=>55,
:remembered_shady_object_limit=>0,
:old_object=>2422,
:old_object_limit=>0,
:oldmalloc_increase=>277386,
:oldmalloc_limit=>16777216
}
戻り値のハッシュ... -
JSON
:: State # object _ nl -> String (9125.0) -
JSON 形式の文字列中に現れる JavaScript のオブジェクトの行末に挿入する文字列を返します。
...y]{
require "json"
json_state = JSON::State.new(object_nl: "")
json_state.object_nl # => ""
puts JSON.generate([1, 2, { name: "tanaka", age: 19 }], json_state)
# => [1,2,{"name":"tanaka","age":19}]
json_state = JSON::State.new(object_nl: "\n")
json_state.object_nl # => "\n"......puts JSON.generate([1, 2, { name: "tanaka", age: 19 }], json_state)
# => [1,2,{
# "name":"tanaka",
# "age":19
# }]
//}... -
JSON
:: State # object _ nl=(string) (9125.0) -
JSON 形式の文字列中に現れる JavaScript のオブジェクトの行末に挿入する文字列をセットします。
...[例][ruby]{
require "json"
json_state = JSON::State.new(object_nl: "")
json_state.object_nl # => ""
puts JSON.generate([1, 2, { name: "tanaka", age: 19 }], json_state)
# => [1,2,{"name":"tanaka","age":19}]
json_state.object_nl = "\n"
json_state.object_nl # => "\n"
puts JSO......N.generate([1, 2, { name: "tanaka", age: 19 }], json_state)
# => [1,2,{
# "name":"tanaka",
# "age":19
# }]
//}... -
static VALUE rb
_ mod _ extend _ object(VALUE mod , VALUE obj) (6200.0) -
-
JSON
:: Generator :: GeneratorMethods :: Object # to _ json(state _ or _ hash = nil) -> String (3106.0) -
自身を to_s で文字列にした結果を JSON 形式の文字列に変換して返します。
...ォールバックのためのメソッドです。
@param state_or_hash 生成する JSON 形式の文字列をカスタマイズするため
に JSON::State のインスタンスか、
JSON::State.new の引数と同じ Hash を
指......ruby]{
require "json"
class Person
attr :name, :age
def initialize(name, age)
@name, @age = name, age
end
end
tanaka = Person.new("tanaka", 29)
tanaka.to_json # => "\"#<Person:0x00007ffdec0167c8>\""
tanaka.method(:to_json).owner # => JSON::Ext::Generator::GeneratorMethods::Object
//}... -
JSON
:: State . new(options = {}) -> JSON :: State (3106.0) -
自身を初期化します。
...オブジェクトを表す部分にある ':' の
前に挿入する文字列をセットします。デフォルトは空文字列です。
: :object_nl
JSON 形式の文字列中に現れる JavaScript のオブジェクトの行末に挿入する文字列を指定します。
デフォル......require "json"
json_state = JSON::State.new(indent: "\t")
json_state.class # => JSON::Ext::Generator::State
json_state.indent # => "\t"
//}
//emlist[例 JSON::State を指定][ruby]{
require "json"
json_state = JSON::State.new(indent: "\t")
copy = JSON::State.new(json_state)
copy.class # => JS... -
JSON
:: State # [](name) -> object (3101.0) -
Return the value returned by method name.
Return the value returned by method name. -
JSON
:: State # generate(obj) -> String (3016.0) -
Generates a valid JSON document from object obj and returns the result. If no valid JSON document can be created this method raises a GeneratorError exception.
...Generates a valid JSON document from object obj and returns the
result. If no valid JSON document can be created this method raises a
GeneratorError exception.... -
JSON
:: State # to _ h -> Hash (3006.0) -
自身をハッシュに変換します。
...ハッシュに変換します。
//emlist[例][ruby]{
require "json"
require "pp"
json_state = JSON::State.new
pp json_state.to_h
# => {:indent=>"",
# :space=>"",
# :space_before=>"",
# :object_nl=>"",
# :array_nl=>"",
# :allow_nan=>false,
# :ascii_only=>false,
# :max...