種類
- インスタンスメソッド (67)
- 文書 (18)
- ライブラリ (11)
ライブラリ
-
irb
/ context (11) -
irb
/ output-method (22) -
minitest
/ unit (1) - pp (33)
クラス
-
IRB
:: Context (11) -
IRB
:: OutputMethod (22) - Object (33)
モジュール
キーワード
-
NEWS for Ruby 2
. 5 . 0 (7) -
inspect
_ mode= (11) - irb (11)
-
mu
_ pp (1) - ppx (11)
-
pretty
_ inspect (11) -
pretty
_ print (11) -
pretty
_ print _ inspect (11) -
ruby 1
. 8 . 5 feature (11)
検索結果
先頭5件
-
IRB
:: OutputMethod # pp(*objs) -> object (18117.0) -
各 obj を inspect した文字列を self に出力し、最後に改行を出力します。
...各 obj を inspect した文字列を self に出力し、最後に改行を出力します。
@param objs 任意のオブジェクトを指定します。... -
Object
# pretty _ inspect -> String (14117.0) -
self を pp で表示したときの結果を文字列として返します。
...self を pp で表示したときの結果を文字列として返します。... -
Object
# pretty _ print _ inspect -> String (14117.0) -
Object#pretty_print を使って Object#inspect と同様に オブジェクトを人間が読める形式に変換した文字列を返します。
...Object#pretty_print を使って Object#inspect と同様に
オブジェクトを人間が読める形式に変換した文字列を返します。
出力する全てのオブジェクトに Object#pretty_print が定義されている必要があります。
そうでない場合には RuntimeEr... -
Object
# pretty _ print(pp) -> () (8229.0) -
PP.pp や Kernel.#pp がオブジェクトの内容を出力するときに 呼ばれるメソッドです。PP オブジェクト pp を引数として呼ばれます。
...
PP.pp や Kernel.#pp がオブジェクトの内容を出力するときに
呼ばれるメソッドです。PP オブジェクト pp を引数として呼ばれます。
あるクラスの pp の出力をカスタマイズしたい場合は、このメソッドを再定義します。
そのと......ッドは指定された pp に対して表示したい自身の内容を追加して
いかなければいけません。いくつかの組み込みクラスについて、
pp ライブラリはあらかじめ pretty_print メソッドを定義しています。
@param pp PP オブジェクトで......す。
//emlist[][ruby]{
require 'pp'
class Array
def pretty_print(q)
q.group(1, '[', ']') {
q.seplist(self) {|v|
q.pp v
}
}
end
end
//}
@see Object#pretty_print_cycle, Object#inspect, PrettyPrint#text, PrettyPrint#group, PrettyPrint#breakable......す。
//emlist[][ruby]{
class Array
def pretty_print(q)
q.group(1, '[', ']') {
q.seplist(self) {|v|
q.pp v
}
}
end
end
//}
@see Object#pretty_print_cycle, Object#inspect, PrettyPrint#text, PrettyPrint#group, PrettyPrint#breakable... -
IRB
:: Context # inspect _ mode=(opt) (6137.0) -
実行結果の出力方式を opt に設定します。
...false, :to_s, :raw
出力結果を to_s したものを表示します。
: true, :p, :inspect
出力結果を inspect したものを表示します。
: :pp, :pretty_inspect
出力結果を pretty_inspect したものを表示します。
: :yaml, :YAML
出力結果を YAML 形式にした......ものを表示します。
: :marshal, :Marshal, :MARSHAL, Marshal
出力結果を Marshal.#dump したものを表示します。
@see lib:irb#inspect_mode... -
MiniTest
:: Assertions # mu _ pp(object) -> String (6117.0) -
Object#inspect した結果のエンコーディングを変更して返します。
...Object#inspect した結果のエンコーディングを変更して返します。
エンコーディングは Encoding.default_external に変更されます。
@param object 任意のオブジェクトを指定します。... -
IRB
:: OutputMethod # ppx(prefix , *objs) -> object (6116.0) -
引数 prefix + 各 obj を inspect した文字列を self に出力し、最後に改行 を出力します。
...引数 prefix + 各 obj を inspect した文字列を self に出力し、最後に改行
を出力します。
@param prefix 各 obj の先頭に追記する文字列を指定します。
@param objs 任意のオブジェクトを指定します。... -
irb (102.0)
-
irb は Interactive Ruby の略です。 irb を使うと、Ruby の式を標準入力から簡単に入力・実行することができます。
...示する (デフォルト)
--noecho 実行結果を表示しない
--inspect 結果出力にinspectを用いる (bc モード以外ではデフォルト)
--noinspect 結果出力にinspectを用いない
--readline readlineライブラリを利用する
--nor......= nil
IRB.conf[:EVAL_HISTORY] = nil
IRB.conf[:HISTORY_FILE] = nil
IRB.conf[:IGNORE_EOF] = true
IRB.conf[:IGNORE_SIGINT] = true
IRB.conf[:INSPECT_MODE] = nil
IRB.conf[:IRB_NAME] = "irb"
IRB.conf[:IRB_RC] = nil
IRB.conf[:MATH_MODE] = false
IRB.conf[:PROMPT] = {....}
IRB.conf[:PROMP......[:INSPECT_MODE] に以下のいずれかの値を設定する事で、結果出力の
方式を変更する事ができます。
: false, :to_s, :raw
出力結果を to_s したものを表示します。
: true, :p, :inspect
出力結果を inspect したものを表示します。
: :pp,......実行結果を表示する (デフォルト)
--noecho 実行結果を表示しない
--inspect 結果出力にinspectを用いる
--noinspect 結果出力にinspectを用いない
--readline readlineライブラリを利用する
--noreadline readline......= nil
IRB.conf[:EVAL_HISTORY] = nil
IRB.conf[:HISTORY_FILE] = nil
IRB.conf[:IGNORE_EOF] = true
IRB.conf[:IGNORE_SIGINT] = true
IRB.conf[:INSPECT_MODE] = nil
IRB.conf[:IRB_NAME] = "irb"
IRB.conf[:IRB_RC] = nil
IRB.conf[:PROMPT] = {....}
IRB.conf[:PROMPT_MODE] = :DEFAULT
IRB.conf[:... -
NEWS for Ruby 2
. 5 . 0 (12.0) -
NEWS for Ruby 2.5.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...黙の to_s 呼び出しにも refinements が影響するようになりました 13812
=== 組み込みクラスの更新
* Array
* Array#append を追加 12746
* Array#prepend を追加 12746
* Data
* 非推奨になりました。C拡張のベースクラスでしたが、Ruby......teger#anybits?, Integer#nobits? を追加 12753
* Integer.sqrt を追加 13219
* Kernel
* Object#yield_self を追加 6721
* Kernel.#pp をrequireなしで使えるようにしました 14123
* Kernel.#warn :uplevel というキーワード引数を追加しました 12882
*......ps://blog.rubygems.org/2017/08/27/2.6.13-released.html
* securerandom
* SecureRandom.alphanumeric を追加
* set
* Set#to_s を Set#inspect の別名として追加 13676
* Set#=== を Set#include? の別名として追加 13801
* Set#reset 6589
* stringio
* StringIO#wr... -
ruby 1
. 8 . 5 feature (12.0) -
ruby 1.8.5 feature ruby 1.8.4 から ruby 1.8.5 までの変更点です。
..._nonblock [new]
: UDPSocket#recvfrom_nonblock [new]
追加
=== 2006-06-17
: Pathname(path) [new]
pathname で追加
: Kernel#pretty_inspect [new]
pp で追加
: RSS::TaxonomyTopicModel [new]
: RSS::TaxonomyTopicsModel [new]
: RSS::Maker::TaxonomyTopicModel [new]
: RSS::Maker::TaxonomyTo...