390件ヒット
[201-300件を表示]
(0.115秒)
ライブラリ
- ビルトイン (60)
-
cgi
/ core (24) -
irb
/ context (12) - json (12)
-
net
/ pop (108) -
net
/ telnet (6) - pp (24)
- prettyprint (12)
-
rubygems
/ commands / dependency _ command (12) -
rubygems
/ requirement (12) - socket (12)
- stringio (36)
- uri (24)
-
webrick
/ httpresponse (36)
クラス
-
ARGF
. class (12) - CGI (24)
-
Gem
:: Commands :: DependencyCommand (12) -
Gem
:: Requirement (12) -
IRB
:: Context (12) -
JSON
:: Parser (12) - Module (12)
-
Net
:: POPMail (108) -
Net
:: Telnet (6) - Object (36)
- PrettyPrint (12)
- Socket (12)
- String (24)
- StringIO (36)
-
URI
:: MailTo (24) -
WEBrick
:: HTTPResponse (36)
キーワード
- all (36)
- connect (12)
-
content
_ length (12) -
content
_ length= (12) -
each
_ char (24) - header (12)
-
inplace
_ mode (12) -
instance
_ method (12) - mail (36)
- newline (12)
- pop (36)
-
pretty
_ print (12) -
pretty
_ print _ inspect (12) -
pretty
_ print _ instance _ variables (12) -
print
_ dependencies (12) - printf (12)
- puts (2)
-
return
_ format (12) - source (12)
-
to
_ mailtext (12) -
to
_ rfc822text (12) -
to
_ s (24) - write (2)
検索結果
先頭5件
-
Net
:: POPMail # pop -> String (110.0) -
メールを受信します。
...ックを利用する例:
require 'net/pop'
Net::POP3.start('pop.example.com', 110) {|pop|
pop.each_mail do |m|
m.pop do |str|
print str
end
end
}
@param io メールの内容を書きこむオブジェクト
@raise TimeoutError 通信がタイムアウトした... -
URI
:: MailTo # to _ mailtext -> String (109.0) -
URI オブジェクトからメールテキスト文字列を生成します。
...スト文字列を生成します。
例:
require 'uri'
p mailto = URI.parse("mailto:ruby-list@ruby-lang.org?subject=subscribe&cc=myaddr")
print mailto.to_mailtext
=> #<URI::MailTo:0x20104a0e URL:mailto:ruby-list@ruby-lang.org?subject=subscribe&cc=myaddr>
To: ruby-list@ruby-lang.org... -
URI
:: MailTo # to _ rfc822text -> String (109.0) -
URI オブジェクトからメールテキスト文字列を生成します。
...スト文字列を生成します。
例:
require 'uri'
p mailto = URI.parse("mailto:ruby-list@ruby-lang.org?subject=subscribe&cc=myaddr")
print mailto.to_mailtext
=> #<URI::MailTo:0x20104a0e URL:mailto:ruby-list@ruby-lang.org?subject=subscribe&cc=myaddr>
To: ruby-list@ruby-lang.org... -
IRB
:: Context # return _ format -> String (108.0) -
irb のプロンプトでの評価結果を表示する際のフォーマットを文字列で返します。
...irb のプロンプトでの評価結果を表示する際のフォーマットを文字列で返します。
@see IRB::Context#return_format=, print_format... -
JSON
:: Parser # source -> String (108.0) -
現在のソースのコピーを返します。
...現在のソースのコピーを返します。
//emlist[例][ruby]{
require 'json'
parser = JSON::Parser.new(DATA.read)
print parser.source
# => {
# => "Tanaka": {
# => "name":"tanaka",
# => "age":20
# => },
# => "Suzuki": {
# => "name":"suzuki",
# => "age":25
# => }
#... -
WEBrick
:: HTTPResponse # to _ s -> String (108.0) -
実際にクライアントに送られるデータを文字列として返します。
...文字列として返します。
require 'webrick'
include WEBrick
res = HTTPResponse.new( { :HTTPVersion => "1.1" } )
res.body = 'hoge'
print res.to_s
#=> 出力結果
HTTP/1.1 200 OK
Connection: Keep-Alive
Date: Sat, 27 Oct 2007 08:58:49 GMT
Server:
Content-Length: 4... -
Module
# instance _ method(name) -> UnboundMethod (43.0) -
self のインスタンスメソッド name をオブジェクト化した UnboundMethod を返します。
...Symbol または String で指定します。
@raise NameError self に存在しないメソッドを指定した場合に発生します。
@see Module#public_instance_method, Object#method
//emlist[例][ruby]{
class Interpreter
def do_a() print "there, "; end
def do_d() print "Hello "; end......f do_e() print "!\n"; end
def do_v() print "Dave"; end
Dispatcher = {
"a" => instance_method(:do_a),
"d" => instance_method(:do_d),
"e" => instance_method(:do_e),
"v" => instance_method(:do_v)
}
def interpret(string)
string.each_char {|b| Dispatcher[b].bind(self).c... -
Socket
# connect(server _ sockaddr) -> 0 (13.0) -
connect(2) でソケットを接続します。
...connect(2) でソケットを接続します。
server_sockaddr は、
lib:socket#pack_string
もしくは Addrinfo オブジェクト
です。
0 を返します。
@param server_sockaddr 接続先アドレス
@raise Errno::EXXX connect(2) がエラーを報告した場合に発生します。......connect で www.ruby-lang.org:80 に接続するには以下のようにします。
例:
require 'socket'
s = Socket.new(Socket::AF_INET, Socket::SOCK_STREAM, 0)
sockaddr = Socket.sockaddr_in(80, "www.ruby-lang.org")
s.connect(sockaddr)
s.write "GET / HTTP/1.0\r\n\r\n"
print s.read... -
WEBrick
:: HTTPResponse # content _ length -> Integer | nil (13.0) -
Content-Length ヘッダの値を整数で表すアクセサです。デフォルトは nil です。
...Content-Length ヘッダの値を整数で表すアクセサです。デフォルトは nil です。
: body が String オブジェクトである場合
content_length の値が nil のとき Content-Length ヘッダには
body のサイズが使われます。nil でないとき body の実......ebrick'
include WEBrick
res = HTTPResponse.new( { :HTTPVersion => "1.1" } )
f = File.new('testfile')
res.body = f
res.content_length = 2
print res.to_s
#=> 出力結果
HTTP/1.1 200 OK
Connection: Keep-Alive
Date: Sat, 27 Oct 2007 12:04:32 GMT
Server:
Content-Length: 2...