るりまサーチ

最速Rubyリファレンスマニュアル検索!
496件ヒット [401-496件を表示] (0.019秒)
トップページ > クエリ:indent[x]

別のキーワード

  1. prettyprint indent
  2. json indent
  3. json indent=
  4. state indent
  5. state indent=

検索結果

<< < ... 3 4 5 >>

pp (12.0)

オブジェクトなどを見やすく出力するためのライブラリです。

...tyPrint::Text:0x81a0a7c @tail=0, @width=1, @text=",">, #<PrettyPrint::Break
able:0x81a0a2c @group=2, @gensace=#<Proc:0x81a0cc0>, @newline="\n", @indent=1, @
tail=2, @sep=" ", @width=1>, #<PrettyPrint::Group:0x81a09c8 @group=2, @tail=1, @
buf=[#<PrettyPrint::Text:0x81a0950 @tail=1, @width=1, @t...
...ail=0, @text=",", @width=1>,
#<PrettyPrint::Breakable:0x40d0516
@genspace=#<Proc:0x40d0656>,
@group=2,
@indent=1,
@newline="\n",
@sep=" ",
@tail=2,
@width=1>,
#<PrettyPrint::Group:0x40d04e4
@b...

JSON.#generate(object, state = nil) -> String (6.0)

与えられたオブジェクトを一行の JSON 形式の文字列に変換して返します。

...オブジェクトを指定できます。
ハッシュを使用する場合指定可能なオプションは以下の通りです。

: :indent
インデントに使用する文字列を指定します。デフォルトは空文字列です。
: :space
a string that is put after, a : or...

JSON.#unparse(object, state = nil) -> String (6.0)

与えられたオブジェクトを一行の JSON 形式の文字列に変換して返します。

...オブジェクトを指定できます。
ハッシュを使用する場合指定可能なオプションは以下の通りです。

: :indent
インデントに使用する文字列を指定します。デフォルトは空文字列です。
: :space
a string that is put after, a : or...

JSON::State#to_h -> Hash (6.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,
#...

JSON::State#to_hash -> Hash (6.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,
#...

絞り込み条件を変える

Ruby用語集 (6.0)

Ruby用語集 A B C D E F G I J M N O R S Y

...どうかを指定するもの(frozen_string_literal)、
インデント不整合の警告を出すかどうかを指定するもの(warn_indent
がある。

参照:d:spec/m17n#magic_comment

: ミックスイン
: mix-in
モジュールやクラスに対し、他のモジュー...

irb (6.0)

irb は Interactive Ruby の略です。 irb を使うと、Ruby の式を標準入力から簡単に入力・実行することができます。

...) 式を .irbrc に記述すると、
irb コマンドのオプションを指定したのと同じ効果が得られます。

IRB.conf[:AUTO_INDENT] = false
IRB.conf[:BACK_TRACE_LIMIT] = 16
IRB.conf[:DEBUG_LEVEL] = 1
IRB.conf[:ECHO] = nil
IRB.conf[:EVAL_HISTORY] = nil
IRB.conf[:HISTORY...

prettyprint (6.0)

pretty printing アルゴリズムのためのライブラリです。

...らば全て同時に改行します。

//emlist[][ruby]{
require 'prettyprint'

p2 = PrettyPrint.new('', 10)
s = 'hello'
p2.text(s)
p2.group(p2.indent + s.size + 1) do
p2.breakable
p2.text('a')
p2.breakable
p2.text('b')
p2.breakable
p2.text('c')
end
p2.flush
puts p2.output
#=>
# hello...
<< < ... 3 4 5 >>