るりまサーチ

最速Rubyリファレンスマニュアル検索!
44件ヒット [1-44件を表示] (0.064秒)
トップページ > クエリ:-[x] > クエリ:TEXT[x] > 種類:クラス[x]

別のキーワード

  1. _builtin -
  2. open-uri open
  3. irb/input-method new
  4. irb/input-method gets
  5. matrix -

ライブラリ

キーワード

検索結果

Net::IMAP::BodyTypeText (6033.0)

Content-Type が text であるメッセージを表すクラスです。

...Content-Type が text であるメッセージを表すクラスです。

平文のメールを表します。
詳しくは MIME のRFC(2045)を参照してください。...

CSV (49.0)

このクラスは CSV ファイルやデータに対する完全なインターフェイスを提供します。

...全なインターフェイスを提供します。

=== 読み込み

//emlist[][ruby]{
require "csv"

csv_text = <<~CSV_TEXT
Ruby,1995
Rust,2010
CSV_TEXT

IO.write "sample.csv", csv_text

# ファイルから一行ずつ
CSV.foreach("sample.csv") do |row|
p row
end
# => ["Ruby", "1995"]
#...
...v")
# => [["Ruby", "1995"], ["Rust", "2010"]]

# 文字列から一行ずつ
CSV.parse(csv_text) do |row|
p row
end
# => ["Ruby", "1995"]
# ["Rust", "2010"]

# 文字列から一度に
p CSV.parse(csv_text)
# => [["Ruby", "1995"], ["Rust", "2010"]]
//}

=== 書き込み

//emlist[][ruby]{
requi...
...important to note that while all of CSV's core parser is now
Encoding agnostic, some features are not. For example, the built-in
converters will try to transcode data to UTF-8 before making conversions.
Again, you can provide custom converters that are aware of your Encodings to
avoid this translat...

REXML::Instruction (43.0)

XML 処理命令(XML Processing Instruction, XML PI)を表すクラス。

...equire 'rexml/document'
doc = REXML::Document.new(<<EOS)
<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/css" href="style.css"?>
<root />
EOS
doc[2] # => <?p-i xml-stylesheet ...?>
doc[2].target # => "xml-stylesheet"
doc[2].content # => "type=\"text/css\" href=\"style.css\""
//}...

RDoc::Markup (25.0)

RDoc 形式のドキュメントを目的の形式に変換するためのクラスです。

...例:

require 'rdoc/markup'
require 'rdoc/markup/to_html'

class
WikiHtml < RDoc::Markup::ToHtml
# WikiWord のフォントを赤く表示。
def handle_special_WIKIWORD(special)
"<font color=red>" + special.text + "</font>"
end
end

m = RDoc::Markup.new
# { 〜 }...
...# <no> 〜 </no> までを :STRIKE でフォーマットする。
m.add_html("no", :STRIKE)

# WikiWord を追加。
m.add_special(/\b([A-Z][a-z]+[A-Z]\w+)/, :WIKIWORD)

wh = WikiHtml.new(m)
# :STRIKE のフォーマットを <strike> 〜 </strike> に指定。
wh.add_tag(:STRIKE, "<str...