るりまサーチ

最速Rubyリファレンスマニュアル検索!
299件ヒット [1-100件を表示] (0.113秒)
トップページ > クエリ:i[x] > クエリ:NS[x] > クエリ:first[x]

別のキーワード

  1. _builtin to_i
  2. fiddle to_i
  3. matrix elements_to_i
  4. matrix i
  5. _builtin i

ライブラリ

キーワード

検索結果

<< 1 2 3 > >>

CGI::QueryExtension::Value#first -> self (27201.0)

@todo

@todo

RubyVM::InstructionSequence#first_lineno -> Integer (21213.0)

self が表す命令シーケンスの 1 行目の行番号を返します。

...の 1 行目の行番号を返します。

例1:irb で実行した場合

RubyVM::InstructionSequence.compile('num = 1 + 2').first_lineno
# => 1

例2:

# /tmp/method.rb
require "foo-library"
def foo
p :foo
end

RubyVM::InstructionSequence.of(method(:foo)).first_lineno
# => 2...

REXML::Attributes#get_attribute_ns(namespace, name) -> REXML::Attribute | nil (15331.0)

namespace と name で特定される属性を返します。

...る属性を返します。

namespace で名前空間を、 name で prefix を含まない属性名を
指定します。

指定された属性が存在しない場合は nil を返します。

XML プロセッサが prefix を置き換えてしまった場合でも、このメソッドを
使...
...I, 文字列)
@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='&lt;'/>
</root>
EOS
a = doc.get_elements("/root/a").first...
...a.attributes.get_attribute_ns("", "att") # => att='&lt;'
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
//}...

CSV.instance(data = $stdout, options = Hash.new) -> CSV (12312.0)

このメソッドは CSV.new のように CSV のインスタンスを返します。 しかし、返される値は Object#object_id と与えられたオプションを キーとしてキャッシュされます。

...る値は Object#object_id と与えられたオプションを
キーとしてキャッシュされます。

ブロックが与えられた場合、生成されたインスタンスをブロックに渡して評価した
結果を返します。

@param data String か IO のインスタンスを...
...am options CSV.new のオプションと同じオプションを指定できます。

//emlist[例][ruby]{
require "csv"

options = { headers: true }

text =<<-EOS
i
d,first name,last name,age
1,taro,tanaka,20
2,jiro,suzuki,18
3,ami,sato,19
4,yumi,adachi,21
EOS

csv = CSV.instance(text, options)
csv...
...2 = CSV.instance(text, options)
csv.object_id == csv2.object_id # => true
print csv.read

# => id,first name,last name,age
# 1,taro,tanaka,20
# 2,jiro,suzuki,18
# 3,ami,sato,19
# 4,yumi,adachi,21
//}

@see CSV.new...

CSV.instance(data = $stdout, options = Hash.new) {|csv| ... } -> object (12312.0)

このメソッドは CSV.new のように CSV のインスタンスを返します。 しかし、返される値は Object#object_id と与えられたオプションを キーとしてキャッシュされます。

...る値は Object#object_id と与えられたオプションを
キーとしてキャッシュされます。

ブロックが与えられた場合、生成されたインスタンスをブロックに渡して評価した
結果を返します。

@param data String か IO のインスタンスを...
...am options CSV.new のオプションと同じオプションを指定できます。

//emlist[例][ruby]{
require "csv"

options = { headers: true }

text =<<-EOS
i
d,first name,last name,age
1,taro,tanaka,20
2,jiro,suzuki,18
3,ami,sato,19
4,yumi,adachi,21
EOS

csv = CSV.instance(text, options)
csv...
...2 = CSV.instance(text, options)
csv.object_id == csv2.object_id # => true
print csv.read

# => id,first name,last name,age
# 1,taro,tanaka,20
# 2,jiro,suzuki,18
# 3,ami,sato,19
# 4,yumi,adachi,21
//}

@see CSV.new...

絞り込み条件を変える

REXML::Parent#insert_after(child1, child2) -> self (12206.0)

child2 を child1 で指定したノードの後ろに挿入します。

...ild2 を child1 で指定したノードの後ろに挿入します。

child1 が REXML::Child のインスタンスであるならば、その
子ノードの後ろに挿入されます。
child1 が 文字列であるならば、XPath で場所を指定します。
具体的には REXML::XPath.fi...
...rst(self, child1) で特定されるノードの
後ろに挿入されます。

挿入されるノード(child2)の親は self に変更されます。

@param child1 挿入場所の指定
@param child2 挿入されるノード...

REXML::Parent#insert_before(child1, child2) -> self (12206.0)

child2 を child1 で指定したノードの前に挿入します。

...child2 を child1 で指定したノードの前に挿入します。

child1 が REXML::Child のインスタンスであるならば、その
子ノードの前に挿入されます。
child1 が 文字列であるならば、XPath で場所を指定します。
具体的には REXML::XPath.first(...
...self, child1) で特定されるノードの
前に挿入されます。

挿入されるノード(child2)の親は self に変更されます。

@param child1 挿入場所の指定
@param child2 挿入されるノード...

REXML::Formatters::Transitive (12006.0)

XMLドキュメントをテキストの内容を変えずに 多少の整形を加えて出力するクラスです。

...

//emlist[][ruby]{
require 'rexml/document'
require 'rexml/formatters/transitive'
doc = REXML::Document.new <<EOS
<root><children>
<grandchildren foo='bar' />
</children></root>
EOS

transitive_formatter = REXML::Formatters::Transitive.new
output = StringIO.new
transitive_formatter.write(doc, ou...
...ing
# => "<root\n><children\n >\n<grandchildren foo='bar'\n />\n</children\n ></root\n>\n"
print output.string
# >> <root
# >> ><children
# >> >
# >> <grandchildren foo='bar'
# >> />
# >> </children
# >> ></root
# >> >

output = StringIO.new
transitive_formatter.write(REXML::XPath.first...
...(doc, "/root/children"), output)
output.string
# => "<children\n>\n<grandchildren foo='bar'\n />\n</children\n>"
//}...

RubyVM::InstructionSequence#to_a -> Array (9006.0)

self の情報を 14 要素の配列にして返します。

...ンスを以下の情報で表します。

: magic

データフォーマットを示す文字列。常に
"YARVInstructionSequence/SimpleDataFormat"。

: major_version

命令シーケンスのメジャーバージョン。

: minor_version

命令シーケンスのマイナーバージ...
...ータフォーマットを示す数値。常に 1。

: misc

以下の要素から構成される Hash オブジェクト。

:arg_size: メソッド、ブロックが取る引数の総数(1 つもない場合は 0)。

:local_size: ローカル変数の総数 + 1。

:stack_max: ス...
...in>"。文字列から作成していた場合は
"<compiled>"。

: #path

命令シーケンスの相対パス。文字列から作成していた場合は "<compiled>"。

: #absolute_path

命令シーケンスの絶対パス。文字列から作成していた場合は nil。

: #first_li...

CGI::QueryExtension::Value#last -> self (9001.0)

@todo

@todo

絞り込み条件を変える

<< 1 2 3 > >>