るりまサーチ

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

別のキーワード

  1. openssl to_text
  2. prettyprint text
  3. cgi text_field
  4. rexml/document text
  5. cgi/html text_field

検索結果

<< 1 2 > >>

REXML::Comment (18006.0)

XML コメントを表すクラス。

...コメントとは <!-- と --> で挟まれたテキストです。

//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new(<<EOS)
<!-- xx -->
<root>
<!-- yy -->
text

<!-- zz -->
</root>
EOS

doc[0].string # => " xx "
doc.root[1].string # => " yy "
doc.root[3].string # => " zz "
//}...

RDoc::Text#normalize_comment(text) -> String (9232.0)

引数から行頭のスペースや改行文字などを削除します。

...から行頭のスペースや改行文字などを削除します。

詳しくは [SEE ALSO] の各メソッドを参照してください。

@param text 文字列を指定します。

@see RDoc::Text#strip_hashes, RDoc::Text#expand_tabs,
RDoc::Text#flush_left, RDoc::Text#strip_newlines...

RDoc::Context::Section#set_comment(comment) -> () (9220.0)

自身にコメントを設定します。

...身にコメントを設定します。

@param comment 文字列を指定します。

comment
の最初の行に :section: を含んでいた場合、その行以降の文字列をコ
メントとして設定します。そうでない場合は comment すべてをコメントとして
設定し...

RDoc::Context::Section#comment -> String | nil (9101.0)

section のコメントを返します。

section のコメントを返します。

RDoc::Context::Section.new(parent, title, comment) -> RDoc::Context::Section (3207.0)

自身を初期化します。

...自身を初期化します。

@param parent RDoc::Context オブジェクトを指定します。

@param title section のタイトルを文字列で指定します。

@param comment section のコメントを文字列で指定します。

また、section のシーケンス番号を新しく...

絞り込み条件を変える

RDoc::Text#parse(text) -> RDoc::Markup::Document | Array (3151.0)

引数から RDoc::Text#normalize_comment でスペースや改行文字などを削 除した後に解析を行います。

...引数から RDoc::Text#normalize_comment でスペースや改行文字などを削
除した後に解析を行います。

@param text 文字列を指定します。

@see RDoc::Text#normalize_comment...

RDoc::Context#set_current_section(title, comment) -> () (3101.0)

Handle sections

Handle sections

rexml/parsers/streamparser (174.0)

ストリーム式の XML パーサ。

...メソッドを呼び出します。順が前後することはありません。

===[a:example] StreamParserの例

この例では tag_start と text をオーバーライドして
開始タグとテキストの情報を受け取れるようにしています。
空白や改行もテキストで...
...@events = []
end

def text(text)
@events << "text[#{text}]"
end

def tag_start(name, attrs)
@events << "tag_start[#{name}]"
end

attr_reader :events
end

xml = <<EOS
<members>
<member name="apple" color="red">
<comment>comment here</comment>
</member>
<member name=...
....events
# => ["tag_start[members]",
# "text[\n ]",
# "tag_start[member]",
# "text[\n ]",
# "tag_start[comment]",
# "text[comment here]",
# "text[\n ]",
# "text[\n ]",
# "tag_start[member]",
# "text[\n]",
# "text[\n]"]
//}

=== コールバック仕様確...

ruby 1.6 feature (96.0)

ruby 1.6 feature ruby version 1.6 は安定版です。この版での変更はバグ修正がメイン になります。

...ません。コメントの扱いなどは、1.7
とは異なります。(((<ruby 1.7 feature>)) の 2002-06-24 も参照)

p "#{ "" # comment }"
=> ruby 1.6.8 (2002-10-04) [i586-linux]
""
=> -:1: parse error
ruby 1.7.3 (2002-10-04) [i586-linux]

: Si...
...のようなスクリプトでTEXT_PLAINが"text/plain; charset=iso-8859-1"
のように書き換えられていました。
((<ruby-dev:14716>))

require 'cgi'

TEXT
_PLAIN = "text/plain"

cgi = CGI.new
print cgi.header("type" => TEXT_PLAIN,...
..." => "iso-8859-1")
printf("TEXT_PLAIN: %s\n", TEXT_PLAIN)

=> ruby 1.6.4 (2001-06-04) [i586-linux]
Content-Type: text/plain; charset=iso-8859-1
^M
TEXT
_PLAIN: text/plain; charset=iso-8859-1
TEXT
_PLAIN: text/plain

=> ruby 1.6.5 (200...
<< 1 2 > >>