種類
- 特異メソッド (88)
- インスタンスメソッド (77)
- 文書 (26)
- モジュール関数 (22)
- ライブラリ (11)
ライブラリ
- ビルトイン (110)
- prettyprint (55)
-
rdoc
/ markdown (11) -
rdoc
/ text (11)
クラス
-
Encoding
:: Converter (55) - PrettyPrint (55)
-
RDoc
:: Markdown (11) - String (33)
モジュール
- Kernel (22)
-
RDoc
:: Text (11)
キーワード
-
NEWS for Ruby 2
. 4 . 0 (8) -
NEWS for Ruby 2
. 5 . 0 (7) -
break
_ on _ newline (11) - convpath (11)
- encode (33)
- format (11)
- new (55)
- open (22)
-
rdoc
/ markdown (11) -
search
_ convpath (11) -
singleline
_ format (11) -
strip
_ newlines (11) - 正規表現 (11)
検索結果
先頭5件
- PrettyPrint
# newline -> String - RDoc
:: Text # strip _ newlines(text) -> String - RDoc
:: Markdown # break _ on _ newline -> bool - Encoding
:: Converter . search _ convpath(source _ encoding , destination _ encoding , options) -> Array - PrettyPrint
. format(output = & # 39;& # 39; , maxwidth = 79 , newline = "\n" , genspace = lambda{|n| & # 39; & # 39; * n}) {|pp| . . . } -> object
-
PrettyPrint
# newline -> String (21301.0) -
自身の改行文字を返します。
自身の改行文字を返します。 -
RDoc
:: Text # strip _ newlines(text) -> String (12400.0) -
引数から先頭と末尾の改行を削除します。
...引数から先頭と末尾の改行を削除します。
@param text 文字列を指定します。... -
RDoc
:: Markdown # break _ on _ newline -> bool (12301.0) -
改行を保持した状態で出力するかどうかを返します。
改行を保持した状態で出力するかどうかを返します。
デフォルトでは false を返します。 -
Encoding
:: Converter . search _ convpath(source _ encoding , destination _ encoding , options) -> Array (6516.0) -
引数で指定した文字エンコーディングの変換の経路を配列にして返します。
...ーディングの変換の経路を配列にして返します。
@param source_encoding 変換元の文字エンコーディングを Encoding オ
ブジェクトか文字列で指定します。
@param destination_encoding 変換先の文字エンコーディングを......param options 変換の詳細を指定する定数やハッシュを指定します。
Encoding::Converter.new と同じオプションが指定でき
ます。
//emlist[][ruby]{
p Encoding::Converter.search_convpath("ISO-8859-1", "EUC-JP")
# => [[#<Encoding:ISO-8859-1......<Encoding:UTF-8>],
# [#<Encoding:UTF-8>, #<Encoding:EUC-JP>]]
p Encoding::Converter.search_convpath("ISO-8859-1", "EUC-JP", universal_newline: true)
# or
p Encoding::Converter.search_convpath("ISO-8859-1", "EUC-JP", newline: :universal)
# => [[#<Encoding:ISO-8859-1>, #<Encoding:UTF-8>],
# [... -
PrettyPrint
. format(output = & # 39;& # 39; , maxwidth = 79 , newline = "\n" , genspace = lambda{|n| & # 39; & # 39; * n}) {|pp| . . . } -> object (6313.0) -
PrettyPrint オブジェクトを生成し、それを引数としてブロックを実行します。 与えられた output を返します。
...PrettyPrint オブジェクトを生成し、それを引数としてブロックを実行します。
与えられた output を返します。
以下と同じ働きをするもので簡便のために用意されています。
//emlist[][ruby]{
require 'prettyprint'
begin
pp = PrettyPrint.ne......w(output, maxwidth, newline, &genspace)
...
pp.flush
output
end
//}
@param output 出力先を指定します。output は << メソッドを持っていなければなりません。
@param maxwidth 行の最大幅を指定します。ただし、改行できないものが渡された場......合は、
実際の出力幅は maxwidth を越えることがあります。
@param newline 改行に使われます。
@param genspace 空白の生成に使われる Proc オブジェクトを指定します。
生成したい空白の幅を表す整数を引数... -
PrettyPrint
. singleline _ format(output = & # 39;& # 39; , maxwidth = 79 , newline = "\n" , genspace = lambda{|n| & # 39; & # 39; * n}) {|pp| . . . } -> object (6313.0) -
PrettyPrint オブジェクトを生成し、それを引数としてブロックを実行します。 PrettyPrint.format に似ていますが、改行しません。
...PrettyPrint オブジェクトを生成し、それを引数としてブロックを実行します。
PrettyPrint.format に似ていますが、改行しません。
引数 maxwidth, newline と genspace は無視されます。ブロック中の breakable の実行は、
改行せずに text......の実行であるかのように扱います。
@param output 出力先を指定します。output は << メソッドを持っていなければなりません。
@param maxwidth 無視されます。
@param newline 無視されます。
@param genspace 無視されます。... -
rdoc
/ markdown (6048.0) -
Markdown 形式で記述されたドキュメントを rdoc 上で解析するための サブライブラリです。
...Markdown 形式で記述されたドキュメントを rdoc 上で解析するための
サブライブラリです。
詳しくは以下を参照してください。
* https://daringfireball.net/projects/markdown/syntax
Markdown 形式をデフォルトのフォーマットにする場合は......== RDoc
RDoc の Markdown のパーサは以下の無効にできない機能があります。
Underscores embedded in words are never interpreted as emphasis. (While the
[markdown dingus][dingus] emphasizes in-word underscores, neither the
Markdown syntax nor MarkdownTest mention this behavior.......)
また URL を記述すると HTML を出力する際に自動でリンクを作成します。URL
はそのまま表示されます。
==== Break on Newline
RDoc::Markdown#break_on_newline を設定する事で改行を保持した状態
で出力が行えます。詳しくは以下を参照... -
正規表現 (3810.0)
-
正規表現 * metachar * expansion * char * anychar * string * str * quantifier * capture * grouping * subexp * selector * anchor * cond * option * encoding * comment * free_format_mode * absenceop * list * specialvar * references
...* metachar
* expansion
* char
* anychar
* string
* str
* quantifier
* capture
* grouping
* subexp
* selector
* anchor
* cond
* option
* encoding
* comment
* free_format_mode
* absenceop
* list
* specialvar
* references
正規表現(regular expression)は......ば
//emlist[][ruby]{
/[a-z]/
/\Axyz\Z/
//}
という正規表現において "[a-z]", "\A", "\Z"はメタ文字列です。
===[a:expansion] 式展開
正規表現内では、#{式} という形式で式を評価した文字列を埋め込むことが
できます。
//emlist[][ruby]{
place = "......pec/literal#backslash)で、
以下の記法が利用可能です。
\t 水平タブ horizontal tab (0x09)
\v 垂直タブ vertical tab (0x0B)
\n 改行 newline (0x0A)
\r 復帰 return... -
Encoding
:: Converter . new(convpath) -> Encoding :: Converter (3380.0) -
Encoding::Converter オブジェクトを作成します。
...nverter オブジェクトを作成します。
@param source_encoding 変換元のエンコーディング
@param destination_encoding 変換先のエンコーディング
@param options 変換の詳細を指定する定数やハッシュ
@param convpath 変換経路の配列
options では Strin......nverter::INVALID_REPLACE
* Encoding::Converter::UNDEF_REPLACE
* Encoding::Converter::UNDEF_HEX_CHARREF
* Encoding::Converter::UNIVERSAL_NEWLINE_DECORATOR
* Encoding::Converter::CRLF_NEWLINE_DECORATOR
* Encoding::Converter::CR_NEWLINE_DECORATOR
* Encoding::Converter::XML_TEXT_DECORATOR......erter::XML_ATTR_CONTENT_DECORATOR
* Encoding::Converter::XML_ATTR_QUOTE_DECORATOR
//emlist[][ruby]{
# UTF-16BE to UTF-8
ec = Encoding::Converter.new("UTF-16BE", "UTF-8")
# Usually, decorators such as newline conversion are inserted last.
ec = Encoding::Converter.new("UTF-16BE", "UTF-8", :univers... -
Encoding
:: Converter . new(source _ encoding , destination _ encoding) -> Encoding :: Converter (3380.0) -
Encoding::Converter オブジェクトを作成します。
...nverter オブジェクトを作成します。
@param source_encoding 変換元のエンコーディング
@param destination_encoding 変換先のエンコーディング
@param options 変換の詳細を指定する定数やハッシュ
@param convpath 変換経路の配列
options では Strin......nverter::INVALID_REPLACE
* Encoding::Converter::UNDEF_REPLACE
* Encoding::Converter::UNDEF_HEX_CHARREF
* Encoding::Converter::UNIVERSAL_NEWLINE_DECORATOR
* Encoding::Converter::CRLF_NEWLINE_DECORATOR
* Encoding::Converter::CR_NEWLINE_DECORATOR
* Encoding::Converter::XML_TEXT_DECORATOR......erter::XML_ATTR_CONTENT_DECORATOR
* Encoding::Converter::XML_ATTR_QUOTE_DECORATOR
//emlist[][ruby]{
# UTF-16BE to UTF-8
ec = Encoding::Converter.new("UTF-16BE", "UTF-8")
# Usually, decorators such as newline conversion are inserted last.
ec = Encoding::Converter.new("UTF-16BE", "UTF-8", :univers...