47件ヒット
[1-47件を表示]
(0.138秒)
ライブラリ
- ビルトイン (3)
- json (22)
- optparse (11)
-
rexml
/ document (11)
クラス
-
JSON
:: State (22) - OptionParser (11)
- Refinement (3)
モジュール
-
REXML
:: Node (11)
キーワード
-
import
_ methods (3) - indent= (11)
-
summary
_ indent (11) -
to
_ s (11)
検索結果
先頭5件
-
JSON
:: State # indent -> String (18215.0) -
インデントに使用する文字列を返します。
...インデントに使用する文字列を返します。
//emlist[例][ruby]{
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 # indent=(string) (6227.0) -
インデントに使用する文字列をセットします。
...デントに使用する文字列をセットします。
@param string インデントに使用する文字列を指定します。
//emlist[例][ruby]{
require "json"
json_state = JSON::State.new(indent: "\t")
json_state.indent # => "\t"
JSON.generate({key1: "value1", key2: "value2"}, json_stat......e)
# => "{\t\"key1\":\"value1\",\t\"key2\":\"value2\"}"
json_state.indent = " "
JSON.generate({key1: "value1", key2: "value2"}, json_state)
# => "{ \"key1\":\"value1\", \"key2\":\"value2\"}"
//}... -
OptionParser
# summary _ indent -> String (6221.0) -
サマリを表示する時のインデントを文字列で返します。
...s.on("-u", "--update")
opts.on_tail("-h", "--help")
end
opts.summary_indent # => " "
opts.summarize
# => [" -i, --init\n", " -u, --update\n", " -h, --help\n"]
opts.summary_indent = " "
opts.summary_indent # => " "
opts.summarize
# => [" -i, --init\n", " -u, --updat... -
REXML
:: Node # to _ s(indent = -1) -> String (209.0) -
ノードを文字列に変換します。
...ノードを文字列に変換します。
@param indent このパラメータは deprecated で、無視されます... -
Refinement
# import _ methods(*modules) -> self (25.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
# Can't import method...