ライブラリ
- ビルトイン (4)
-
irb
/ context (24) - json (120)
- optparse (72)
- prettyprint (36)
- psych (24)
-
rexml
/ document (156)
クラス
-
IRB
:: Context (24) -
JSON
:: State (96) - OptionParser (72)
- PrettyPrint (36)
-
Psych
:: Emitter (24) -
REXML
:: AttlistDecl (12) -
REXML
:: Attribute (12) -
REXML
:: Declaration (12) -
REXML
:: DocType (12) -
REXML
:: Document (24) -
REXML
:: Element (12) -
REXML
:: Entity (12) -
REXML
:: ExternalEntity (12) -
REXML
:: Formatters :: Pretty (12) -
REXML
:: Formatters :: Transitive (12) -
REXML
:: NotationDecl (12) - Refinement (4)
モジュール
- JSON (24)
-
REXML
:: Node (12)
キーワード
- Ruby用語集 (12)
-
auto
_ indent _ mode (12) -
auto
_ indent _ mode= (12) - configure (12)
-
from
_ state (12) - generate (12)
- group (12)
-
import
_ methods (4) - indent= (12)
- indentation (12)
- indentation= (12)
- irb (12)
- merge (12)
- nest (12)
- new (60)
- pp (12)
- prettyprint (12)
- summarize (24)
-
summary
_ indent (12) -
summary
_ indent= (12) -
to
_ h (12) -
to
_ hash (12) -
to
_ s (12) - unparse (12)
-
whole
_ match _ p (12) - write (120)
検索結果
先頭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...