るりまサーチ

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

別のキーワード

  1. optparse on
  2. optionparser on
  3. tracer on
  4. thread abort_on_exception
  5. _builtin abort_on_exception

検索結果

<< 1 2 3 > >>

JSON::State#indent -> String (21113.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\"}"
//}...

Psych::Emitter#indentation -> Integer (12200.0)

インデントのレベルを返します。

...インデントのレベルを返します。


@see Psych::Emitter#indentation=...

Psych::Emitter#indentation=(level) (12200.0)

インデントのレベルを指定します。

...インデントのレベルを指定します。

1 から 9 までの整数で指定します。

@param level インデントレベル
@see Psych::Emitter#indentation...

OptionParser#summary_indent=(indent) (9244.0)

サマリを表示する時のインデントを文字列で指定します。

...@param indent サマリを表示する時に使われるインデントを文字列で指定します。

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

opts = OptionParser.new do |opts|
opts.on_head("-i", "--init")
opts.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, --update\n", " -h, --help\n"]
//}...

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

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

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

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

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

json_state = JSON::State.new(indent: "\t")
json_state.indent # => "\t"
JSON.generate({key1: "va...
...lue1", key2: "value2"}, json_state)
# => "{\t\"key1\":\"value1\",\t\"key2\":\"value2\"}"

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

@see JSON::State.new...

絞り込み条件を変える

OptionParser#summary_indent -> String (9137.0)

サマリを表示する時のインデントを文字列で返します。

...= OptionParser.new do |opts|
opts.on_head("-i", "--init")
opts.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...

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

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

...uby]{
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 = " "
JSON.generate({key1: "value1", key2: "value2"}, json_state)
# => "{...

IRB::Context#auto_indent_mode -> bool (9107.0)

入力が次の行に継続した時に自動で字下げを行うかどうかを返します。

...入力が次の行に継続した時に自動で字下げを行うかどうかを返します。

デフォルト値は false です。

@return 自動で字下げを行う場合は true を返します。行わない場合は false
を返します。

@see IRB::Context#auto_indent_mode=...

IRB::Context#auto_indent_mode=(val) (9107.0)

入力が次の行に継続した時に自動で字下げを行うかどうかを val に設定します。

...します。

@param val true を指定した場合、自動で字下げを行います。false を指定し
た場合は自動で字下げを行いません。

IRB::Context#prompt_mode の変更に影響を受ける事に注意してください。

@see IRB::Context#auto_indent_mode...
<< 1 2 3 > >>