るりまサーチ

最速Rubyリファレンスマニュアル検索!
24件ヒット [1-24件を表示] (0.070秒)

別のキーワード

  1. tempfile create
  2. resolv create
  3. registry create
  4. win32/registry create
  5. json create_id

ライブラリ

モジュール

検索結果

JSON.create_id -> String (18114.0)

json_create メソッドで使用するクラスを決定するために使用する値を返します。

...on_class" です。

//emlist[例][ruby]{
require "json"

class User
attr :id, :name
def initialize(id, name)
@id, @name = id, name
end

def self.json_create(object)
new(object['id'], object["name"])
end

def as_json(*)
{
JSON.create_id => self.class.name,
"id" =>...

JSON.create_id=(identifier) (6126.0)

json_create メソッドで使用するクラスを決定するために使用する値をセットします。

...します。

//emlist[例][ruby]{
require "json"
require "json/add/core"

JSON.create_id # => "json_class"
puts (1..5).to_json # => {"json_class":"Range","a":[1,5,false]}
JSON.create_id = "my_json_class" # => "my_json_class"
JSON.create_id # => "my_j...