るりまサーチ

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

別のキーワード

  1. string []=
  2. string slice!
  3. string slice
  4. string []
  5. string gsub

キーワード

検索結果

net/smtp (25.0)

メールを送信するためのプロトコル SMTP (Simple Mail Transfer Protocol) を扱うライブラリです。

..., 'from@example.com', 'to@example.net')
From: Your Name <from@example.com>
To: Dest Address <to@example.net>
Subject: test mail
Date: Sat, 23 Jun 2001 16:26:43 +0900
Message-Id: <unique.message.id.string@yourhost.example.com>

This is a test mail.
EndOfMail
}

==== セッショ...
...こともありません。

# using SMTP#finish
require 'net/smtp'
smtp = Net::SMTP.start('smtp.example.com', 25)
smtp.send_message mail_string, 'from@example.com', 'to@example.net'
smtp.finish

またブロック付きの Net::SMTP.start, Net::SMTP#start
を使うと finish を呼んで...
...しょう。

# using block form of SMTP.start
require 'net/smtp'
Net::SMTP.start('smtp.example.com', 25) {|smtp|
smtp.send_message mail_string, 'from@example.com', 'to@example.net'
}

==== 文字列以外からの送信

ひとつ上の例では文字列リテラル (ヒアドキュメ...

rdoc (25.0)

RDoc は Ruby のドキュメント生成を行うためのライブラリです。rdoc という ドキュメント生成のためのコマンドも含んでいます。

...
パラメータもそこに出力されます。

def fred
...
yield line, address

上のようなメソッド定義に対して、以下の出力が得られます。

fred() { |line, address| ... }

メソッド名の直後に ':yields: …' を含むコメントを書くと、こ...
...の出力を上書
きできます。

def fred # :yields: index, position
...
yield line, address

上のようにすると、以下の出力になります。

fred() { |index, position| ... }

====[a:escape] エスケープ

マークアップは <tt> タグ内部などでバッ...
...title で指定したものに上書きします。

//emlist{
# :category: Utility Methods
#
# CGI escapes +text+

def convert_string text
CGI.escapeHTML text
end
//}

title を省略した場合は、:section: を指定しなかった場合と同じように扱
...