756件ヒット
[601-700件を表示]
(0.093秒)
ライブラリ
- ビルトイン (334)
-
net
/ pop (108) -
net
/ smtp (36) - resolv (12)
- shell (6)
-
shell
/ command-processor (6) -
shell
/ filter (6) - socket (12)
- stringio (176)
-
win32
/ registry (12) - win32ole (48)
クラス
-
ARGF
. class (12) - Array (21)
- BasicSocket (12)
- Enumerator (24)
- Module (12)
-
Net
:: POPMail (108) -
Net
:: SMTP (36) - Range (5)
-
Resolv
:: DNS (12) - Shell (6)
-
Shell
:: CommandProcessor (6) -
Shell
:: Filter (6) - String (260)
- StringIO (176)
-
WIN32OLE
_ VARIABLE (48) -
Win32
:: Registry (12)
キーワード
- % (2)
- all (36)
- bytes (38)
- chars (38)
- codepoints (38)
-
each
_ byte (48) -
each
_ char (48) -
each
_ codepoint (48) -
each
_ grapheme _ cluster (16) -
each
_ key (12) -
each
_ line (48) -
each
_ resource (12) - echo (18)
-
grapheme
_ clusters (16) -
inplace
_ mode (12) -
instance
_ method (12) - lines (38)
- mail (36)
- name (12)
-
ole
_ type (12) -
ole
_ type _ detail (12) - pack (21)
- pop (36)
- recvmsg (12)
-
send
_ mail (12) - sendmail (12)
- step (3)
- sum (12)
-
to
_ s (12) - unpack (12)
- upto (12)
-
with
_ object (24)
検索結果
先頭5件
-
WIN32OLE
_ VARIABLE # ole _ type _ detail -> [String] (108.0) -
変数の型と属性を取得します。
...eturn 変数の型と属性を文字列配列で返します。
tobj = WIN32OLE_TYPE.new('Microsoft XML, v5.0', 'tagSTATSTG')
tobj.variables.each do |v|
puts "#{v.ole_type} [#{v.ole_type_detail.join(', ')}] #{v.name}"
end
出力結果
Unknown Type 31 [] pwcsName # => VT_LPWSTR... -
Enumerator
# with _ object(obj) -> Enumerator (37.0) -
繰り返しの各要素に obj を添えてブロックを繰り返し、obj を返り値として返します。
...do |x|
y << x
end
end
to_three_with_string = to_three.with_object("foo")
to_three_with_string.each do |x,string|
puts "#{string}: #{x}"
end
# => foo:0
# => foo:1
# => foo:2
//}
@param obj 繰り返しの各要素に添えて渡されるオブジェクト
@see Enumerable#each_with_object... -
Enumerator
# with _ object(obj) {|(*args) , memo _ obj| . . . } -> object (37.0) -
繰り返しの各要素に obj を添えてブロックを繰り返し、obj を返り値として返します。
...do |x|
y << x
end
end
to_three_with_string = to_three.with_object("foo")
to_three_with_string.each do |x,string|
puts "#{string}: #{x}"
end
# => foo:0
# => foo:1
# => foo:2
//}
@param obj 繰り返しの各要素に添えて渡されるオブジェクト
@see Enumerable#each_with_object... -
Module
# instance _ method(name) -> UnboundMethod (25.0) -
self のインスタンスメソッド name をオブジェクト化した UnboundMethod を返します。
...ンスタンスメソッド name をオブジェクト化した UnboundMethod を返します。
@param name メソッド名を Symbol または String で指定します。
@raise NameError self に存在しないメソッドを指定した場合に発生します。
@see Module#public_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).call }
end
end
interpreter = Interpreter.new
interpreter.interpret('dave')
# => Hello there, Dave!... -
Range
# %(s) -> Enumerator (25.0) -
範囲内の要素を s おきに繰り返します。
...::ArithmeticSequence を返します。
@return ブロックを指定しなかったその他の Range の時は Enumerator を返します。(例: String の Range)
//emlist[例][ruby]{
(1..10).step(3) {|v| p v}
# => 1
# 4
# 7
# 10
("a".."f").step(2) {|v| p v}
# => "a"
# "c"
# "e"......きます)
//emlist[数値以外の Range に対する例][ruby]{
# Time の Range は each でイテレートできない
(Time.utc(2024, 12, 25)...Time.utc(2024, 12, 26)).each { |t| p t }
# => 'Range#each': can't iterate from Time (TypeError)
# step は使用可能
(Time.utc(2024, 12, 25)...Ti... -
Range
# %(s) -> Enumerator :: ArithmeticSequence (25.0) -
範囲内の要素を s おきに繰り返します。
...::ArithmeticSequence を返します。
@return ブロックを指定しなかったその他の Range の時は Enumerator を返します。(例: String の Range)
//emlist[例][ruby]{
(1..10).step(3) {|v| p v}
# => 1
# 4
# 7
# 10
("a".."f").step(2) {|v| p v}
# => "a"
# "c"
# "e"......きます)
//emlist[数値以外の Range に対する例][ruby]{
# Time の Range は each でイテレートできない
(Time.utc(2024, 12, 25)...Time.utc(2024, 12, 26)).each { |t| p t }
# => 'Range#each': can't iterate from Time (TypeError)
# step は使用可能
(Time.utc(2024, 12, 25)...Ti... -
Range
# step(s = 1) -> Enumerator (25.0) -
範囲内の要素を s おきに繰り返します。
...::ArithmeticSequence を返します。
@return ブロックを指定しなかったその他の Range の時は Enumerator を返します。(例: String の Range)
//emlist[例][ruby]{
(1..10).step(3) {|v| p v}
# => 1
# 4
# 7
# 10
("a".."f").step(2) {|v| p v}
# => "a"
# "c"
# "e"......きます)
//emlist[数値以外の Range に対する例][ruby]{
# Time の Range は each でイテレートできない
(Time.utc(2024, 12, 25)...Time.utc(2024, 12, 26)).each { |t| p t }
# => 'Range#each': can't iterate from Time (TypeError)
# step は使用可能
(Time.utc(2024, 12, 25)...Ti... -
Range
# step(s = 1) -> Enumerator :: ArithmeticSequence (25.0) -
範囲内の要素を s おきに繰り返します。
...::ArithmeticSequence を返します。
@return ブロックを指定しなかったその他の Range の時は Enumerator を返します。(例: String の Range)
//emlist[例][ruby]{
(1..10).step(3) {|v| p v}
# => 1
# 4
# 7
# 10
("a".."f").step(2) {|v| p v}
# => "a"
# "c"
# "e"......きます)
//emlist[数値以外の Range に対する例][ruby]{
# Time の Range は each でイテレートできない
(Time.utc(2024, 12, 25)...Time.utc(2024, 12, 26)).each { |t| p t }
# => 'Range#each': can't iterate from Time (TypeError)
# step は使用可能
(Time.utc(2024, 12, 25)...Ti... -
Range
# step(s = 1) {|item| . . . } -> self (25.0) -
範囲内の要素を s おきに繰り返します。
...::ArithmeticSequence を返します。
@return ブロックを指定しなかったその他の Range の時は Enumerator を返します。(例: String の Range)
//emlist[例][ruby]{
(1..10).step(3) {|v| p v}
# => 1
# 4
# 7
# 10
("a".."f").step(2) {|v| p v}
# => "a"
# "c"
# "e"......きます)
//emlist[数値以外の Range に対する例][ruby]{
# Time の Range は each でイテレートできない
(Time.utc(2024, 12, 25)...Time.utc(2024, 12, 26)).each { |t| p t }
# => 'Range#each': can't iterate from Time (TypeError)
# step は使用可能
(Time.utc(2024, 12, 25)...Ti... -
Net
:: SMTP # send _ mail(mailsrc , from _ addr , *to _ addrs) -> () (19.0) -
メールを送信します。
...メールを送信します。
mailsrc をメールとして送信します。
mailsrc は each イテレータを持つ
オブジェクトならなんでも構いません(たとえば String や File)。
from_domain は送り主のメールアドレス ('...@...'のかたち) 、
to_addrs に......ールアドレスを文字列で渡します。
require 'net/smtp'
Net::SMTP.start('smtp.example.com') {|smtp|
smtp.send_message mail_string,
'from@example.com',
'to1@example.net', 'to2@example.net'
}
sendmail は obsolete です。
@param m... -
Net
:: SMTP # send _ message(mailsrc , from _ addr , *to _ addrs) -> () (19.0) -
メールを送信します。
...メールを送信します。
mailsrc をメールとして送信します。
mailsrc は each イテレータを持つ
オブジェクトならなんでも構いません(たとえば String や File)。
from_domain は送り主のメールアドレス ('...@...'のかたち) 、
to_addrs に......ールアドレスを文字列で渡します。
require 'net/smtp'
Net::SMTP.start('smtp.example.com') {|smtp|
smtp.send_message mail_string,
'from@example.com',
'to1@example.net', 'to2@example.net'
}
sendmail は obsolete です。
@param m... -
Net
:: SMTP # sendmail(mailsrc , from _ addr , *to _ addrs) -> () (19.0) -
メールを送信します。
...メールを送信します。
mailsrc をメールとして送信します。
mailsrc は each イテレータを持つ
オブジェクトならなんでも構いません(たとえば String や File)。
from_domain は送り主のメールアドレス ('...@...'のかたち) 、
to_addrs に......ールアドレスを文字列で渡します。
require 'net/smtp'
Net::SMTP.start('smtp.example.com') {|smtp|
smtp.send_message mail_string,
'from@example.com',
'to1@example.net', 'to2@example.net'
}
sendmail は obsolete です。
@param m... -
Net
:: POPMail # all {|str| . . . . } -> nil (16.0) -
メールを受信します。
...,
'YourAccount', 'YourPassword') {|pop|
pop.mails.each do |m|
puts m.pop
end
}
ブロックを利用する例:
require 'net/pop'
Net::POP3.start('pop.example.com', 110) {|pop|
pop.each_mail do |m|
m.pop do |str|
print str
end
end... -
Net
:: POPMail # all(io) -> object (16.0) -
メールを受信します。
...,
'YourAccount', 'YourPassword') {|pop|
pop.mails.each do |m|
puts m.pop
end
}
ブロックを利用する例:
require 'net/pop'
Net::POP3.start('pop.example.com', 110) {|pop|
pop.each_mail do |m|
m.pop do |str|
print str
end
end...