1235件ヒット
[1-100件を表示]
(0.158秒)
ライブラリ
- ビルトイン (399)
-
cgi
/ html (253) - date (11)
- delegate (11)
- digest (11)
- openssl (44)
- pathname (11)
- rake (11)
-
rdoc
/ markup (11) -
rdoc
/ parser (11) -
rexml
/ document (319) -
rexml
/ streamlistener (11) - strscan (11)
-
webrick
/ httputils (99) - zlib (22)
クラス
- Array (41)
- Date (11)
-
Digest
:: Base (11) -
Enumerator
:: Lazy (77) -
Enumerator
:: Yielder (11) - Exception (11)
-
File
:: Stat (11) - Float (44)
- Hash (39)
- Module (16)
-
OpenSSL
:: Digest (22) -
OpenSSL
:: HMAC (22) - Pathname (11)
-
RDoc
:: Markup (11) -
RDoc
:: Parser (11) -
REXML
:: Attributes (154) -
REXML
:: CData (22) -
REXML
:: Element (110) -
REXML
:: Elements (33) - Rational (11)
-
RubyVM
:: InstructionSequence (20) - String (30)
- StringScanner (11)
- Thread (22)
-
Thread
:: Backtrace :: Location (11) -
WEBrick
:: HTTPUtils :: FormData (99) -
Zlib
:: Deflate (11) -
Zlib
:: Inflate (11)
モジュール
-
CGI
:: HtmlExtension (253) - Enumerable (55)
- FileUtils (11)
- Kernel (11)
-
REXML
:: StreamListener (11)
キーワード
- << (77)
- <= (11)
- <=> (55)
- DelegateClass (11)
- [] (22)
- []= (11)
-
absolute
_ path (11) - add (11)
-
add
_ attribute (22) -
add
_ attributes (11) -
add
_ element (11) -
add
_ special (11) - attribute (11)
-
backtrace
_ locations (33) -
base
_ label (11) -
checkbox
_ group (11) -
chunk
_ while (11) - concat (30)
-
const
_ source _ location (5) - delete (11)
-
delete
_ all (22) -
delete
_ attribute (11) -
delete
_ if (11) - divmod (11)
-
drop
_ while (33) - each (22)
-
each
_ attribute (11) -
each
_ data (11) -
each
_ element _ with _ attribute (11) -
enum
_ for (22) -
file
_ field (11) - filename (11)
- filename= (11)
- filter (6)
- form (44)
-
get
_ attribute (11) -
get
_ attribute _ ns (11) -
get
_ text (11) - hidden (11)
- html (22)
- img (11)
- lazy (11)
- length (11)
- list (11)
-
multipart
_ form (44) - name (11)
- name= (11)
- namespaces (11)
- pack (19)
-
parse
_ files _ matching (11) -
password
_ field (11) - prefixes (11)
-
private
_ method _ defined? (11) -
radio
_ group (11) - reject! (11)
- reset (11)
- ruby (11)
-
scrolling
_ list (11) - select (11)
- size (11)
-
slice
_ when (11) - submit (11)
-
tag
_ start (11) -
take
_ while (44) - text (11)
-
text
_ field (11) -
to
_ a (11) -
to
_ ary (11) -
to
_ binary (9) -
to
_ enum (22) -
to
_ s (11) - unpack (11)
- update (33)
- value (11)
- xpath (11)
検索結果
先頭5件
- Float
# <(other) -> bool - Exception
# backtrace _ locations -> [Thread :: Backtrace :: Location] - Thread
# backtrace _ locations(range) -> [Thread :: Backtrace :: Location] | nil - Thread
# backtrace _ locations(start = 0 , length = nil) -> [Thread :: Backtrace :: Location] | nil - REXML
:: Element # each _ element _ with _ attribute(key , value = nil , max = 0 , name = nil) {|element| . . . } -> ()
-
Float
# <(other) -> bool (24207.0) -
比較演算子。数値として小さいか判定します。
...数値として小さいか判定します。
@param other 比較対象の数値
@return self よりも other が大きい場合 true を返します。
そうでなければ false を返します。
//emlist[例][ruby]{
3.14 < 3.1415 # => true
3.14 <= 3.1415 # => true
//}... -
Exception
# backtrace _ locations -> [Thread :: Backtrace :: Location] (12407.0) -
バックトレース情報を返します。Exception#backtraceに似ていますが、 Thread::Backtrace::Location の配列を返す点が異なります。
...Location の配列を返す点が異なります。
現状では Exception#set_backtrace によって戻り値が変化する事はあり
ません。
//emlist[例: test.rb][ruby]{
require "date"
def check_long_month(month)
return if Date.new(2000, month, -1).day == 31
raise "#{month} is not l......f get_exception
return begin
yield
rescue => e
e
end
end
e = get_exception { check_long_month(2) }
p e.backtrace_locations
# => ["test.rb:4:in `check_long_month'", "test.rb:15:in `block in <main>'", "test.rb:9:in `get_exception'", "test.rb:15:in `<main>'"]
//}
@see Exception#backtrac... -
Thread
# backtrace _ locations(range) -> [Thread :: Backtrace :: Location] | nil (12407.0) -
スレッドの現在のバックトレースを Thread::Backtrace::Location の配 列で返します。
...ースを Thread::Backtrace::Location の配
列で返します。
引数で指定した値が範囲外の場合、スレッドがすでに終了している場合は nil
を返します。
@param start 開始フレームの位置を数値で指定します。
@param length 取得するフレー......す。
Kernel.#caller_locations と似ていますが、本メソッドは self に限定
した情報を返します。
//emlist[例][ruby]{
thread = Thread.new { sleep 1 }
thread.run
thread.backtrace_locations # => ["/path/to/test.rb:1:in `sleep'", "/path/to/test.rb:1:in `block in <main>'"]
//}......@see Thread::Backtrace::Location... -
Thread
# backtrace _ locations(start = 0 , length = nil) -> [Thread :: Backtrace :: Location] | nil (12407.0) -
スレッドの現在のバックトレースを Thread::Backtrace::Location の配 列で返します。
...ースを Thread::Backtrace::Location の配
列で返します。
引数で指定した値が範囲外の場合、スレッドがすでに終了している場合は nil
を返します。
@param start 開始フレームの位置を数値で指定します。
@param length 取得するフレー......す。
Kernel.#caller_locations と似ていますが、本メソッドは self に限定
した情報を返します。
//emlist[例][ruby]{
thread = Thread.new { sleep 1 }
thread.run
thread.backtrace_locations # => ["/path/to/test.rb:1:in `sleep'", "/path/to/test.rb:1:in `block in <main>'"]
//}......@see Thread::Backtrace::Location... -
REXML
:: Element # each _ element _ with _ attribute(key , value = nil , max = 0 , name = nil) {|element| . . . } -> () (12343.0) -
特定の属性を持つすべての子要素を引数としてブロックを呼び出します。
...します。
value を指定すると、keyで指定した属性名を持つ属性の値がvalueである
もののみを対象とします。
maxを指定すると、対象となる子要素の先頭 max 個のみが対象となります。
name を指定すると、それは xpath 文字列と見......列)
@param value 属性値(文字列)
@param max ブロック呼出の対象とする子要素の最大個数
@param name xpath文字列
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new("<a><b id='1'/><c id='2'/><d id='1'/><e/></a>")
doc.root.each_element_with_attribute('id'){|......id='1'/>
# >> <c id='2'/>
# >> <d id='1'/>
doc.root.each_element_with_attribute('id', '1'){|e| p e }
# >> <b id='1'/>
# >> <d id='1'/>
doc.root.each_element_with_attribute('id', '1', 1){|e| p e }
# >> <b id='1'/>
doc.root.each_element_with_attribute('id', '1', 0, 'd'){|e| p e }
# >> <d id='1'/>
//}... -
REXML
:: Element # delete _ attribute(key) -> REXML :: Attribute | nil (12319.0) -
要素から key という属性名の属性を削除します。
...il を返します。
@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.del......ete_attribute("x"); e # => <E y:x='bar'/>
//}... -
REXML
:: Attributes # get _ attribute(name) -> Attribute | nil (12313.0) -
name という名前の属性を取得します。
...は nil を返します。
@param name 属性名(文字列)
@see REXML::Attributes#[]
//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_elements("/root/a").first
a.attributes.get_attribute("att") # => att='<'
a.attributes.get_attribute("foo:att") # => foo:att='1'
//}... -
REXML
:: Attributes # get _ attribute _ ns(namespace , name) -> REXML :: Attribute | nil (12313.0) -
namespace と name で特定される属性を返します。
...場合は nil を返します。
XML プロセッサが prefix を置き換えてしまった場合でも、このメソッドを
使うことで属性を正しく指定することができます。
@param namespace 名前空間(URI, 文字列)
@param name 属性名(文字列)
//emlist[][ruby]{......ml/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_elements("/root/a").first
a.attributes.get_attribute_ns("", "att") # => att='<'
a.attributes.get_at......tribute_ns("http://example.org/foo", "att") # => foo:att='1'
a.attributes.get_attribute_ns("http://example.org/baz", "att") # => nil
a.attributes.get_attribute_ns("http://example.org/foo", "attt") # => nil
//}... -
REXML
:: Attributes # each _ attribute {|attribute| . . . } -> () (12213.0) -
各属性に対しブロックを呼び出します。
...は REXML::Attribute オブジェクトで渡されます。
//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_elements("/r......oot/a").first
a.attributes.each_attribute do |attr|
p [attr.namespace, attr.name, attr.value]
end
# => ["http://example.org/foo", "att", "1"]
# => ["http://example.org/bar", "att", "2"]
# => ["", "att", "<"]
//}... -
Float
# <=(other) -> bool (12207.0) -
比較演算子。数値として等しいまたは小さいか判定します。
...param other 比較対象の数値
@return self よりも other の方が大きい場合か、
両者が等しい場合 true を返します。
そうでなければ false を返します。
//emlist[例][ruby]{
3.14 < 3.1415 # => true
3.14 <= 3.1415 # => true
//}...