296件ヒット
[1-100件を表示]
(0.042秒)
種類
- インスタンスメソッド (204)
- 特異メソッド (68)
- ライブラリ (12)
- 文書 (12)
ライブラリ
-
cgi
/ util (24) - matrix (68)
-
rexml
/ document (168) - rss (12)
クラス
- CGI (24)
- Matrix (32)
-
REXML
:: Attributes (144) -
REXML
:: Element (24) -
RSS
:: Rss :: Channel :: Item :: Guid (12) - Vector (36)
キーワード
- [] (12)
- []= (12)
- attribute (12)
- build (24)
- collect (12)
- combine (8)
- delete (12)
-
delete
_ all (12) - each (12)
-
each
_ attribute (12) -
get
_ attribute (12) -
get
_ attribute _ ns (12) - isPermaLink (12)
- length (12)
- map (12)
- namespaces (12)
- prefixes (12)
-
rexml
/ document (12) -
root
_ node (12) -
ruby 1
. 8 . 4 feature (12) - size (12)
- unescapeElement (12)
-
unescape
_ element (12)
検索結果
先頭5件
-
Vector
. elements(a , copy = true) -> Vector (18213.0) -
配列 a を要素とするベクトルを生成します。 ただし、オプション引数 copy が偽 (false) ならば、複製を行いません。
...の配列
@param copy 引数の配列 a のコピーをするかどうかのフラグ
//emlist[例][ruby]{
require 'matrix'
a = [1, 2, 3, 4]
v1 = Vector.elements(a, true)
v2 = Vector.elements(a, false)
p v1 # => Vector[1, 2, 3, 4]
p v2 # => Vector[1, 2, 3, 4]
a[0] = -1
p v1 #... -
REXML
:: Attributes # each _ attribute {|attribute| . . . } -> () (9206.0) -
各属性に対しブロックを呼び出します。
...XML::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("/root/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", "<"]
//}... -
REXML
:: Attributes # get _ attribute(name) -> Attribute | nil (9206.0) -
name という名前の属性を取得します。
...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("at......t") # => att='<'
a.attributes.get_attribute("foo:att") # => foo:att='1'
//}... -
REXML
:: Attributes # get _ attribute _ ns(namespace , name) -> REXML :: Attribute | nil (9206.0) -
namespace と name で特定される属性を返します。
...空間(URI, 文字列)
@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_elements("/root/......a").first
a.attributes.get_attribute_ns("", "att") # => att='<'
a.attributes.get_attribute_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
//}... -
CGI
. unescapeElement(string , *elements) -> String (6208.0) -
特定の要素だけをHTMLエスケープから戻す。
...。
@param elements HTML タグの名前を一つ以上指定します。文字列の配列で指定することも出来ます。
例:
require "cgi"
print CGI.unescapeElement('<BR><A HREF="url"></A>', "A", "IMG")
# => "<BR><A HREF="url"></A>"......print CGI.unescapeElement('<BR><A HREF="url"></A>', %w(A IMG))
# => "<BR><A HREF="url"></A>"... -
CGI
. unescape _ element(string , *elements) -> String (6208.0) -
特定の要素だけをHTMLエスケープから戻す。
...。
@param elements HTML タグの名前を一つ以上指定します。文字列の配列で指定することも出来ます。
例:
require "cgi"
print CGI.unescapeElement('<BR><A HREF="url"></A>', "A", "IMG")
# => "<BR><A HREF="url"></A>"......print CGI.unescapeElement('<BR><A HREF="url"></A>', %w(A IMG))
# => "<BR><A HREF="url"></A>"... -
REXML
:: Element # attribute(name , namespace = nil) -> REXML :: Attribute | nil (6206.0) -
name で指定される属性を返します。
...ame で指定される属性を返します。
属性は REXML::Attribute オブジェクトの形で返します。
name は "foo:bar" のように prefix を指定することができます。
namespace で名前空間の URI を指定することで、その名前空間内で
name という......前空間のURI(文字列)
//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.attribute("att") #......=> att='<'
a.attribute("att", "http://example.org/bar") # => bar:att='2'
a.attribute("bar:att") # => bar:att='2'
a.attribute("baz") # => nil
//}... -
Matrix
. build(row _ size , column _ size = row _ size) -> Enumerable (6106.0) -
row_size×column_sizeの行列をブロックの返り値から生成します。
...ow_size×column_sizeの行列をブロックの返り値から生成します。
行列の各要素の位置がブロックに渡され、それの返り値が行列の要素となります。
ブロックを省略した場合は Enumerator を返します。
//emlist[例][ruby]{
require 'matrix'......m = Matrix.build(2, 4) {|row, col| col - row }
# => Matrix[[0, 1, 2, 3], [-1, 0, 1, 2]]
m = Matrix.build(3) { rand }
# => a 3x3 matrix with random elements
//}
@param row_size 行列の行数
@param column_size 行列の列数... -
Matrix
. build(row _ size , column _ size = row _ size) {|row , col| . . . } -> Matrix (6106.0) -
row_size×column_sizeの行列をブロックの返り値から生成します。
...ow_size×column_sizeの行列をブロックの返り値から生成します。
行列の各要素の位置がブロックに渡され、それの返り値が行列の要素となります。
ブロックを省略した場合は Enumerator を返します。
//emlist[例][ruby]{
require 'matrix'......m = Matrix.build(2, 4) {|row, col| col - row }
# => Matrix[[0, 1, 2, 3], [-1, 0, 1, 2]]
m = Matrix.build(3) { rand }
# => a 3x3 matrix with random elements
//}
@param row_size 行列の行数
@param column_size 行列の列数...