るりまサーチ

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

別のキーワード

  1. encoding windows_31j
  2. _builtin windows_31j
  3. _builtin cswindows31j
  4. encoding cswindows31j
  5. json j

ライブラリ

クラス

キーワード

検索結果

JSON::State#indent -> String (21114.0)

インデントに使用する文字列を返します。

...インデントに使用する文字列を返します。

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

j
son_state = JSON::State.new(indent: "\t")
j
son_state.indent # => "\t"
J
SON.generate({key1: "value1", key2: "value2"}, json_state)
# => "{\t\"key1\":\"value1\",\t\"key2\":\"value2\"}"
//}...

JSON::State#indent=(string) (9120.0)

インデントに使用する文字列をセットします。

...][ruby]{
require "json"

j
son_state = JSON::State.new(indent: "\t")
j
son_state.indent # => "\t"
J
SON.generate({key1: "value1", key2: "value2"}, json_state)
# => "{\t\"key1\":\"value1\",\t\"key2\":\"value2\"}"
j
son_state.indent = " "
J
SON.generate({key1: "value1", key2: "value2"}, json_state)
# => "...

JSON::State#configure(options = {}) -> self (3025.0)

与えられたハッシュで自身を設定します。

...キーについては JSON::State.new を参照してください。

@param options このオブジェクトの設定をするためのハッシュを指定します。

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

j
son_state = JSON::State.new(indent: "\t")
j
son_state.indent # => "\t"
J
SON.generate({key1:...
..."value1", key2: "value2"}, json_state)
# => "{\t\"key1\":\"value1\",\t\"key2\":\"value2\"}"

j
son_state.configure(indent: " ")
j
son_state.indent # => " "
J
SON.generate({key1: "value1", key2: "value2"}, json_state)
# => "{ \"key1\":\"value1\", \"key2\":\"value2\"}"
//}

@see JSON::State.new...

JSON::State#merge(options = {}) -> self (3025.0)

与えられたハッシュで自身を設定します。

...キーについては JSON::State.new を参照してください。

@param options このオブジェクトの設定をするためのハッシュを指定します。

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

j
son_state = JSON::State.new(indent: "\t")
j
son_state.indent # => "\t"
J
SON.generate({key1:...
..."value1", key2: "value2"}, json_state)
# => "{\t\"key1\":\"value1\",\t\"key2\":\"value2\"}"

j
son_state.configure(indent: " ")
j
son_state.indent # => " "
J
SON.generate({key1: "value1", key2: "value2"}, json_state)
# => "{ \"key1\":\"value1\", \"key2\":\"value2\"}"
//}

@see JSON::State.new...

JSON::State#to_h -> Hash (3007.0)

自身をハッシュに変換します。

...自身をハッシュに変換します。

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

j
son_state = JSON::State.new
pp json_state.to_h

# => {:indent=>"",
# :space=>"",
# :space_before=>"",
# :object_nl=>"",
# :array_nl=>"",
# :allow_nan=>false,
# :ascii_only=>false,...

絞り込み条件を変える

JSON::State#to_hash -> Hash (3007.0)

自身をハッシュに変換します。

...自身をハッシュに変換します。

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

j
son_state = JSON::State.new
pp json_state.to_h

# => {:indent=>"",
# :space=>"",
# :space_before=>"",
# :object_nl=>"",
# :array_nl=>"",
# :allow_nan=>false,
# :ascii_only=>false,...

PrettyPrint#group(indent = 0, open_obj = '', close_obj = '', open_width = open_obj.length, close_width = close_obj.length) {...} -> () (308.0)

与えられたブロックを実行します。 ブロック内で自身に追加される文字列やオブジェクトは、1行にまとめて表示しても よい同じグループに属すると仮定されます。

...ram indent グループのインデントの深さを指定します。

@param open_obj 指定された場合、self.text(open_obj, open_width) がブロックが
実行される前に呼ばれます。開き括弧などを出力するのに使用されます。

@param close_obj...
...場合、self.text(close_obj, close_width) がブロックが
実行された後に呼ばれます。閉じ括弧などを出力するのに使用されます。

@param open_width open_obj のカラムを指定します。

@param close_width close_obj のカラムを指定しま...

REXML::Attribute#write(output, indent = -1) -> object (208.0)

output に self の情報を name='value' という形式で書き込みます。

...output に self の情報を name='value' という形式で書き込みます。

output が返ります。

@param output 書き込み先の IO オブジェクト
@param indent インデントレベル、ここでは無視される...