340件ヒット
[301-340件を表示]
(0.073秒)
ライブラリ
- ビルトイン (4)
-
irb
/ context (24) - json (72)
- optparse (48)
- prettyprint (36)
- psych (24)
-
rexml
/ document (132)
クラス
-
IRB
:: Context (24) -
JSON
:: State (72) - OptionParser (48)
- 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
:: NotationDecl (12) - Refinement (4)
モジュール
-
REXML
:: Node (12)
キーワード
-
auto
_ indent _ mode (12) -
auto
_ indent _ mode= (12) - configure (12)
- group (12)
-
import
_ methods (4) - indent= (12)
- indentation (12)
- indentation= (12)
- merge (12)
- nest (12)
- summarize (24)
-
summary
_ indent (12) -
summary
_ indent= (12) -
to
_ h (12) -
to
_ hash (12) -
to
_ s (12) - write (120)
検索結果
先頭4件
-
JSON
:: State # merge(options = {}) -> self (25.0) -
与えられたハッシュで自身を設定します。
...require "json"
json_state = JSON::State.new(indent: "\t")
json_state.indent # => "\t"
JSON.generate({key1: "value1", key2: "value2"}, json_state)
# => "{\t\"key1\":\"value1\",\t\"key2\":\"value2\"}"
json_state.configure(indent: " ")
json_state.indent # => " "
JSON.generate({key1: "value1", key2... -
Refinement
# import _ methods(*modules) -> self (13.0) -
モジュールからメソッドをインポートします。
...いことに注意してください。
//emlist[][ruby]{
module StrUtils
def indent(level)
' ' * level + self
end
end
module M
refine String do
import_methods StrUtils
end
end
using M
p "foo".indent(3) # => " foo"
module M
refine String do
import_methods Enumerable
#... -
JSON
:: State # to _ h -> Hash (7.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 (7.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,
#...