るりまサーチ

最速Rubyリファレンスマニュアル検索!
44件ヒット [1-44件を表示] (0.082秒)

別のキーワード

  1. comment new
  2. rexml comment
  3. comment ==
  4. etc comment
  5. comment <=>

ライブラリ

キーワード

検索結果

REXML::Comment (18001.0)

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

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 "
//}

Ripper::Filter (13.0)

イベントドリブンスタイルで Ruby プログラムを加工するためのクラスです。

...e 'ripper'
require 'cgi'

class
Ruby2HTML < Ripper::Filter
def on_default(event, tok, f)
f << CGI.escapeHTML(tok)
end

def on_comment(tok, f)
f << %Q[<span class="comment">#{CGI.escapeHTML(tok)}</span>]
end

def on_tstring_beg(tok, f)
f << %Q[<span class="string">#{CGI.escapeHT...

Etc::Passwd (7.0)

Etc.#getpwent で得られる構造体。

...ステムには反映されません。

全てのシステムで提供されているメンバ。
* name
* passwd
* uid
* gid
* gecos
* dir
* shell

以降のメンバはシステムによっては提供されません。
* change
* quota
* age
* class
* comment
* expire...

String (7.0)

文字列のクラスです。 ヌル文字を含む任意のバイト列を扱うことができます。 文字列の長さにはメモリ容量以外の制限はありません。

...すので、
ハッシュのキーに非 ASCII 文字列を使う場合には注意が必要です。

//emlist[動作例: (注)一行目にmagic commentが必要です。][ruby]{
# encoding: UTF-8
h = {}
s = "いろは"
s.force_encoding("EUC-JP")
h[s] = 1
s.force_encoding("ASCII-8BIT")
p h[s]...