312件ヒット
[1-100件を表示]
(0.055秒)
別のキーワード
ライブラリ
- ビルトイン (48)
-
json
/ add / bigdecimal (12) -
json
/ add / exception (12) -
net
/ http (12) - openssl (12)
-
rexml
/ document (156) - socket (36)
- win32ole (24)
クラス
- Addrinfo (12)
- BasicObject (12)
- BasicSocket (24)
- BigDecimal (12)
- Exception (12)
-
OpenSSL
:: BN (12) -
REXML
:: Attribute (36) -
REXML
:: Attributes (12) -
REXML
:: Child (24) -
REXML
:: Element (60) -
REXML
:: Elements (24) - Thread (24)
- WIN32OLE (24)
モジュール
- Enumerable (12)
-
Net
:: HTTPHeader (12)
キーワード
- << (12)
- []= (12)
-
add
_ attribute (24) -
add
_ attributes (12) -
add
_ field (12) -
add
_ trace _ func (12) - chunk (12)
-
connect
_ from (12) -
delete
_ attribute (12) -
local
_ address (12) -
mod
_ add (12) - namespace (12)
-
next
_ sibling= (12) - prefix (12)
-
previous
_ sibling= (12) -
remote
_ address (12) -
set
_ trace _ func (12) - setproperty (24)
-
singleton
_ method _ added (12) - text= (12)
-
to
_ json (24) -
to
_ string (12)
検索結果
先頭5件
-
REXML
:: Elements # add(element = nil) -> REXML :: Element (15144.0) -
要素 element を追加します。
...す。
追加された要素が返されます。
@param element 追加する要素
//emlist[][ruby]{
require 'rexml/document'
a = REXML::Element.new('a')
a.elements.add(REXML::Element.new('b')) # => <b/>
a.to_s # => "<a><b/></a>"
a.elements.add('c') # => <c/>
a.to_s # => "<a><b/><c/></a>"
//}... -
REXML
:: Element # add _ attribute(attr) -> () (12263.0) -
要素の属性を追加します。 同じ名前の属性がすでにある場合はその属性を新しい 属性で置き換えます。
...ibute オブジェクトを
渡す方法です。
文字列2つで指定する場合、属性値は unnormalized な文字列を渡す必要があります。
@param key 属性名(文字列)
@param value 属性値(文字列)
@param attr 属性(REXML::Attribute オブジェクト)
//emlist[][ruby]......{
require 'rexml/document'
doc = REXML::Document.new("<e/>")
doc.root.add_attribute("a", "b"); doc.root # => <e a='b'/>
doc.root.add_attribute("x:a", "c"); doc.root # => <e a='b' x:a='c'/>
doc.root.add_attribute(REXML::Attribute.new("b", "d"))
doc.root # => <e a='b' x:a='c' b='d'/>
//}... -
REXML
:: Element # add _ attribute(key , value) -> () (12263.0) -
要素の属性を追加します。 同じ名前の属性がすでにある場合はその属性を新しい 属性で置き換えます。
...ibute オブジェクトを
渡す方法です。
文字列2つで指定する場合、属性値は unnormalized な文字列を渡す必要があります。
@param key 属性名(文字列)
@param value 属性値(文字列)
@param attr 属性(REXML::Attribute オブジェクト)
//emlist[][ruby]......{
require 'rexml/document'
doc = REXML::Document.new("<e/>")
doc.root.add_attribute("a", "b"); doc.root # => <e a='b'/>
doc.root.add_attribute("x:a", "c"); doc.root # => <e a='b' x:a='c'/>
doc.root.add_attribute(REXML::Attribute.new("b", "d"))
doc.root # => <e a='b' x:a='c' b='d'/>
//}... -
REXML
:: Element # add _ attributes(attrs) -> () (12244.0) -
要素の属性を複数追加します。 同じ名前の属性がすでにある場合はその属性を新しい 属性で置き換えます。
...属性の属性名と属性値の対の集合(Array or Hash)
//emlist[][ruby]{
require 'rexml/document'
e = REXML::Element.new("e")
e.add_attributes({"a" => "b", "c" => "d"})
e # => <e a='b' c='d'/>
e = REXML::Element.new("e")
e.add_attributes([["a", "b"], ["c", "d"]])
e # => <e a='b' c='d'/>
//}... -
OpenSSL
:: BN # mod _ add(other , m) -> OpenSSL :: BN (9214.0) -
(self + other) % m を返します。
...(self + other) % m を返します。
//emlist[][ruby]{
require 'openssl'
OpenSSL::BN.new("7").mod_add(OpenSSL::BN.new("3"), OpenSSL::BN.new("6")) # => 4
//}
@param other 和を取る数
@param m 剰余を取る数
@raise OpenSSL::BNError 計算時エラー... -
BasicObject
# singleton _ method _ added(name) -> object (9207.0) -
特異メソッドが追加された時にインタプリタから呼び出されます。
...hod_addedを使います。
@param name 追加されたメソッド名が Symbol で渡されます。
//emlist[例][ruby]{
class Foo
def singleton_method_added(name)
puts "singleton method \"#{name}\" was added"
end
end
obj = Foo.new
def obj.foo
end
#=> singleton method "foo" was added......//}
@see Module#method_added,BasicObject#singleton_method_removed,BasicObject#singleton_method_undefined... -
BasicSocket
# local _ address -> Addrinfo (9207.0) -
getsockname(2) で得られたローカルアドレス情報を Addrinfo オブジェクトとして返します。
...アドレス情報を
Addrinfo オブジェクトとして返します。
返されたオブジェクトの Addrinfo#protocol は 0 を
返すことに注意してください。
require 'socket'
TCPSocket.open("www.ruby-lang.org", 80) {|s|
p s.local_address #=> #<Addrinfo: 192.168.0.129:......36873 TCP>
}
TCPServer.open("127.0.0.1", 1512) {|serv|
p serv.local_address #=> #<Addrinfo: 127.0.0.1:1512 TCP>
}
@see BasicSocket#getsockname... -
BasicSocket
# remote _ address -> Addrinfo (9207.0) -
getpeername(2) で得られたリモートアドレス情報を Addrinfo オブジェクトとして返します。
...アドレス情報を
Addrinfo オブジェクトとして返します。
返されたオブジェクトの Addrinfo#protocol は 0 を
返すことに注意してください。
require 'socket'
TCPSocket.open("www.ruby-lang.org", 80) {|s|
p s.remote_address #=> #<Addrinfo: 221.186.184.6......8:80 TCP>
}
TCPServer.open("127.0.0.1", 1728) {|serv|
c = TCPSocket.new("127.0.0.1", 1728)
s = serv.accept
p s.remote_address #=> #<Addrinfo: 127.0.0.1:36504 TCP>
}
@see BasicSocket#getpeername... -
REXML
:: Element # delete _ attribute(key) -> REXML :: Attribute | nil (6219.0) -
要素から key という属性名の属性を削除します。
...素(文字列(属性名) or REXML::Attributeオブジェクト)
//emlist[][ruby]{
require 'rexml/document'
e = REXML::Element.new("E")
e.add_attribute("x", "foo"); e # => <E x='foo'/>
e.add_attribute("y:x", "bar"); e # => <E x='foo' y:x='bar'/>
e.delete_attribute("x"); e # => <E y:x='bar'/>
//}...