421件ヒット
[1-100件を表示]
(0.137秒)
ライブラリ
- ビルトイン (3)
-
irb
/ context (22) - json (88)
- optparse (66)
- prettyprint (33)
- psych (22)
-
rexml
/ document (143)
クラス
-
IRB
:: Context (22) -
JSON
:: State (66) - OptionParser (66)
- PrettyPrint (33)
-
Psych
:: Emitter (22) -
REXML
:: AttlistDecl (11) -
REXML
:: Attribute (11) -
REXML
:: Declaration (11) -
REXML
:: DocType (11) -
REXML
:: Document (22) -
REXML
:: Element (11) -
REXML
:: Entity (11) -
REXML
:: ExternalEntity (11) -
REXML
:: Formatters :: Pretty (11) -
REXML
:: Formatters :: Transitive (11) -
REXML
:: NotationDecl (11) - Refinement (3)
モジュール
- JSON (22)
-
REXML
:: Node (11)
キーワード
- Ruby用語集 (11)
-
auto
_ indent _ mode (11) -
auto
_ indent _ mode= (11) - configure (11)
-
from
_ state (11) - generate (11)
- group (11)
-
import
_ methods (3) - indent= (11)
- indentation (11)
- indentation= (11)
- irb (11)
- merge (11)
- nest (11)
- new (55)
- prettyprint (11)
- summarize (22)
-
summary
_ indent (11) -
summary
_ indent= (11) -
to
_ s (11) - unparse (11)
-
whole
_ match _ p (11) - write (110)
検索結果
先頭5件
-
PrettyPrint
# indent -> Integer (27301.0) -
現在のインデントの深さを返します。
現在のインデントの深さを返します。 -
irb (26090.0)
-
irb は Interactive Ruby の略です。 irb を使うと、Ruby の式を標準入力から簡単に入力・実行することができます。
...irb は Interactive Ruby の略です。
irb を使うと、Ruby の式を標準入力から簡単に入力・実行することができます。
=== irb の使い方
Ruby さえ知っていれば irb を使うのは簡単です。
irb コマンドを実行すると、以下のようなプロン......。
$ irb
irb(main):001:0>
あとは Ruby の式を入力するだけで、その式が実行され、結果が表示されます。
irb(main):001:0> 1+2
3
irb(main):002:0> class Foo
irb(main):003:1> def foo
irb(main):004:2> print 1
irb(main):005:2> end
irb(main):006:1>......に「.irbrc」と呼称します。
以下のような (Ruby の) 式を .irbrc に記述すると、
irb コマンドのオプションを指定したのと同じ効果が得られます。
IRB.conf[:AUTO_INDENT] = false
IRB.conf[:BACK_TRACE_LIMIT] = 16
IRB.conf[:DEBUG_LEVEL] = 1
IRB.con... -
JSON
:: State # indent -> String (24313.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\"}"
//}... -
OptionParser
# summary _ indent=(indent) (12444.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"]
//}... -
OptionParser
# summary _ indent -> String (12337.0) -
サマリを表示する時のインデントを文字列で返します。
...列で返します。
//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 # indent=(string) (12319.0) -
インデントに使用する文字列をセットします。
...ring インデントに使用する文字列を指定します。
//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.i... -
Psych
:: Emitter # indentation -> Integer (12300.0) -
インデントのレベルを返します。
...インデントのレベルを返します。
@see Psych::Emitter#indentation=... -
IRB
:: Context # auto _ indent _ mode -> bool (12207.0) -
入力が次の行に継続した時に自動で字下げを行うかどうかを返します。
...入力が次の行に継続した時に自動で字下げを行うかどうかを返します。
デフォルト値は false です。
@return 自動で字下げを行う場合は true を返します。行わない場合は false
を返します。
@see IRB::Context#auto_indent_mode=... -
IRB
:: Context # auto _ indent _ mode=(val) (12207.0) -
入力が次の行に継続した時に自動で字下げを行うかどうかを val に設定します。
...します。
@param val true を指定した場合、自動で字下げを行います。false を指定し
た場合は自動で字下げを行いません。
IRB::Context#prompt_mode の変更に影響を受ける事に注意してください。
@see IRB::Context#auto_indent_mode... -
Psych
:: Emitter # indentation=(level) (12200.0) -
インデントのレベルを指定します。
...インデントのレベルを指定します。
1 から 9 までの整数で指定します。
@param level インデントレベル
@see Psych::Emitter#indentation...