480件ヒット
[1-100件を表示]
(0.084秒)
ライブラリ
- ビルトイン (260)
- csv (24)
- date (4)
- forwardable (24)
- matrix (12)
-
rexml
/ document (156)
クラス
-
CSV
:: Row (24) - Date (2)
- DateTime (2)
-
Enumerator
:: ArithmeticSequence (14) -
Enumerator
:: Lazy (90) -
File
:: Stat (12) - Matrix (12)
- Object (48)
-
REXML
:: Attributes (144) -
REXML
:: Element (12) -
Thread
:: Backtrace :: Location (36)
モジュール
- Enumerable (60)
- Forwardable (24)
キーワード
- <=> (12)
- [] (12)
- []= (12)
- attribute (12)
-
chunk
_ while (12) -
deconstruct
_ keys (4) - delegate (12)
- delete (12)
-
delete
_ all (12) - each (12)
-
each
_ attribute (12) - eager (6)
-
enum
_ for (48) - fields (12)
-
first
_ minor (12) -
get
_ attribute (12) -
get
_ attribute _ ns (12) -
instance
_ delegate (12) - label (12)
- lazy (12)
- length (12)
- lineno (12)
- namespaces (12)
- path (12)
- prefixes (12)
- size (12)
-
slice
_ before (24) -
slice
_ when (12) - take (12)
-
take
_ while (24) -
to
_ enum (48) -
values
_ at (12)
検索結果
先頭5件
-
Enumerator
:: ArithmeticSequence # first -> Numeric | nil (21103.0) -
等差数列の最初の要素、もしくは最初の n 要素を返します。
等差数列の最初の要素、もしくは最初の n 要素を返します。
@param n 取得する要素数。 -
Enumerator
:: ArithmeticSequence # first(n) -> [Numeric] (21103.0) -
等差数列の最初の要素、もしくは最初の n 要素を返します。
等差数列の最初の要素、もしくは最初の n 要素を返します。
@param n 取得する要素数。 -
REXML
:: Attributes # each _ attribute {|attribute| . . . } -> () (9207.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("/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 (9207.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 (9207.0) -
namespace と name で特定される属性を返します。
...o: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.att......ributes.get_attribute_ns("http://example.org/foo", "attt") # => nil
//}... -
Matrix
# first _ minor(row , column) -> Matrix (9202.0) -
self から第 row 行と第 column 列を取り除いた行列を返します。
self から第 row 行と第 column 列を取り除いた行列を返します。
@param row 行
@param column 列
@raise ArgumentError row, column が行列の行数/列数を越えている場合に発生します。 -
Thread
:: Backtrace :: Location # path -> String (9107.0) -
self が表すフレームのファイル名を返します。
...self が表すフレームのファイル名を返します。
例: Thread::Backtrace::Location の例1を用いた例
//emlist[][ruby]{
loc = c(0..1).first
loc.path # => "caller_locations.rb"
//}
@see Thread::Backtrace::Location#absolute_path... -
REXML
:: Element # attribute(name , namespace = nil) -> REXML :: Attribute | nil (6207.0) -
name で指定される属性を返します。
...name で指定される属性を返します。
属性は REXML::Attribute オブジェクトの形で返します。
name は "foo:bar" のように prefix を指定することができます。
namespace で名前空間の URI を指定することで、その名前空間内で
name という......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
//}... -
Forwardable
# delegate(hash) -> () (6113.0) -
メソッドの委譲先を設定します。
...uire 'forwardable'
class Zap
extend Forwardable
delegate :length => :@str
delegate [:first, :last] => :@arr
def initialize
@arr = %w/foo bar baz/
@str = "world"
end
end
zap = Zap.new
zap.length # => 5
zap.first # => "foo"
zap.last # => "baz"... -
Forwardable
# instance _ delegate(hash) -> () (6113.0) -
メソッドの委譲先を設定します。
...uire 'forwardable'
class Zap
extend Forwardable
delegate :length => :@str
delegate [:first, :last] => :@arr
def initialize
@arr = %w/foo bar baz/
@str = "world"
end
end
zap = Zap.new
zap.length # => 5
zap.first # => "foo"
zap.last # => "baz"...