300件ヒット
[1-100件を表示]
(0.115秒)
別のキーワード
ライブラリ
- ビルトイン (36)
-
json
/ add / bigdecimal (12) -
json
/ add / exception (12) -
net
/ http (12) - openssl (12)
-
rexml
/ document (156) - socket (36)
- win32ole (24)
クラス
- Addrinfo (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)
- text= (12)
-
to
_ json (24) -
to
_ string (12)
検索結果
先頭5件
-
BasicSocket
# remote _ address -> Addrinfo (21413.0) -
getpeername(2) で得られたリモートアドレス情報を Addrinfo オブジェクトとして返します。
...tpeername(2) で得られたリモートアドレス情報を
Addrinfo オブジェクトとして返します。
返されたオブジェクトの Addrinfo#protocol は 0 を
返すことに注意してください。
require 'socket'
TCPSocket.open("www.ruby-lang.org", 80) {|s|
p s.remo......te_address #=> #<Addrinfo: 221.186.184.68: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 # add _ attribute(attr) -> () (18369.0) -
要素の属性を追加します。 同じ名前の属性がすでにある場合はその属性を新しい 属性で置き換えます。
...渡す方法と REXML::Attribute オブジェクトを
渡す方法です。
文字列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) -> () (18369.0) -
要素の属性を追加します。 同じ名前の属性がすでにある場合はその属性を新しい 属性で置き換えます。
...渡す方法と REXML::Attribute オブジェクトを
渡す方法です。
文字列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) -> () (18350.0) -
要素の属性を複数追加します。 同じ名前の属性がすでにある場合はその属性を新しい 属性で置き換えます。
...attrs には Hash もしくは Array を指定できます。
Hash の場合は、
{ "name1" => "value1", "name2" => "value2", ... }
という形で、配列の場合は
[ ["name1", "value1"], ["name2", "value2"], ... }
という形で追加/更新する属性を指定します。
@param attrs......属性の属性名と属性値の対の集合(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'/>
//}... -
REXML
:: Elements # add(element = nil) -> REXML :: Element (18250.0) -
要素 element を追加します。
...くは REXML::Element オブジェクトを
指定します。文字列を指定した場合には REXML::Element.new(element)
で生成される要素を追加します。
element を省略した場合は、空の要素が追加されます。
追加された要素が返されます。
@param el......ement 追加する要素
//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>"
//}... -
BasicSocket
# local _ address -> Addrinfo (15313.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... -
REXML
:: Child # previous _ sibling=(other) (15249.0) -
other を self の前の隣接ノードとします。
...other を self の前の隣接ノードとします。
つまり、親ノードが持つ子ノード列の self の前に
other を挿入します。
@param other 挿入するノード
//emlist[][ruby]{
require 'rexml/document'
a = REXML::Element.new("a")
b = a.add_element("b")
c = REXML::Eleme......nt.new("c")
b.next_sibling = c
d = REXML::Element.new("d")
b.previous_sibling = d
p a.to_s # => "<a><d/><b/><c/></a>"
//}... -
REXML
:: Element # delete _ attribute(key) -> REXML :: Attribute | nil (12425.0) -
要素から key という属性名の属性を削除します。
...。
@param 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'/>
//}... -
Thread
# add _ trace _ func(pr) -> Proc (12226.0) -
スレッドにトレース用ハンドラを追加します。
...@param pr トレースハンドラ(Proc オブジェクト)
//emlist[例][ruby]{
th = Thread.new do
class Trace
end
43.to_s
end
th.add_trace_func lambda {|*arg| p arg }
th.join
# => ["line", "example.rb", 4, nil, #<Binding:0x00007f98e107d0d8>, nil]
# => ["c-call", "example.rb", 4, :inherite......d, #<Binding:0x00007f98e1087448>, Class]
# => ["c-return", "example.rb", 4, :inherited, #<Binding:0x00007f98e1085d00>, Class]
# => ["class", "example.rb", 4, nil, #<Binding:0x00007f98e108f210>, nil]
# => ["end", "example.rb", 5, nil, #<Binding:0x00007f98e108e5e0>, nil]
# => ["line", "example.rb", 6,......nil, #<Binding:0x00007f98e108d4b0>, nil]
# => ["c-call", "example.rb", 6, :to_s, #<Binding:0x00007f98e1097aa0>, Integer]
# => ["c-return", "example.rb", 6, :to_s, #<Binding:0x00007f98e1095cc8>, Integer]
//}
@see Thread#set_trace_func Kernel.#set_trace_func...