6件ヒット
[1-6件を表示]
(0.185秒)
ライブラリ
- ビルトイン (2)
-
net
/ pop (2) -
rexml
/ document (2)
クラス
- Hash (2)
-
Net
:: POP3 (2) -
REXML
:: Attributes (1) -
REXML
:: Elements (1)
検索結果
先頭5件
-
Hash
# delete(key) -> object | nil (72718.0) -
key に対応する要素を取り除きます。
key に対応する要素を取り除きます。
@param key 取り除くキーを指定します。
@return 取り除かれた要素の値を返します。
key に対応する要素が存在しない時には nil を返します。
与えられたブロックは key にマッチする要素がなかった時に評価され、その結果を返します。
//emlist[例][ruby]{
h = {:ab => "some" , :cd => "all"}
p h.delete(:ab) #=> "some"
p h.delete(:ef) #=> nil
p h.delete(:ef){|key|"#{k... -
Hash
# delete(key) {|key| . . . } -> object (72718.0) -
key に対応する要素を取り除きます。
key に対応する要素を取り除きます。
@param key 取り除くキーを指定します。
@return 取り除かれた要素の値を返します。
key に対応する要素が存在しない時には nil を返します。
与えられたブロックは key にマッチする要素がなかった時に評価され、その結果を返します。
//emlist[例][ruby]{
h = {:ab => "some" , :cd => "all"}
p h.delete(:ab) #=> "some"
p h.delete(:ef) #=> nil
p h.delete(:ef){|key|"#{k... -
REXML
:: Attributes # delete _ all(name) -> [REXML :: Attribute] (55246.0) -
name という名前を持つ属性をすべて削除します。
name という名前を持つ属性をすべて削除します。
削除された属性を配列で返します。
@param name 削除する属性の名前
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new(<<-EOS)
<root xmlns:foo="http://example.org/foo"
xmlns:bar="http://example.org/bar">
<a foo:att='1' bar:att='2' att='<'/>
</root>
EOS
a = doc.get_elem... -
Net
:: POP3 # delete _ all -> () (54952.0) -
サーバ上のメールを全て消去します。
サーバ上のメールを全て消去します。
ブロックを与えられたときは消去する前に各メールを引数としてブロックを呼びだします。
メールは Net::POPMail のインスタンスとして渡されます。
使用例:
require 'net/pop'
n = 1
pop.delete_all do |m|
File.open("inbox/#{n}") {|f| f.write m.pop }
n += 1
end -
Net
:: POP3 # delete _ all {|popmail| . . . . } -> () (54952.0) -
サーバ上のメールを全て消去します。
サーバ上のメールを全て消去します。
ブロックを与えられたときは消去する前に各メールを引数としてブロックを呼びだします。
メールは Net::POPMail のインスタンスとして渡されます。
使用例:
require 'net/pop'
n = 1
pop.delete_all do |m|
File.open("inbox/#{n}") {|f| f.write m.pop }
n += 1
end -
REXML
:: Elements # delete _ all(xpath) -> [REXML :: Element] (54946.0) -
xpath で指定した XPath 文字列にマッチする要素をすべて取り除きます。
xpath で指定した XPath 文字列にマッチする要素をすべて取り除きます。
@param xpath 取り除く要素を指し示す XPath 文字列
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new('<a><c/><c/><c/><c/></a>')
doc.elements.delete_all("a/c") # => [<c/>, <c/>, <c/>, <c/>]
doc.to_s # => "<a/>"
//}