299件ヒット
[1-100件を表示]
(0.113秒)
種類
- 特異メソッド (178)
- インスタンスメソッド (88)
- クラス (11)
- 定数 (11)
- ライブラリ (11)
ライブラリ
- ビルトイン (24)
-
cgi
/ core (22) - csv (165)
- forwardable (11)
- resolv (11)
-
rexml
/ document (44) - socket (11)
クラス
- CSV (165)
-
REXML
:: Attributes (11) -
REXML
:: Parent (22) -
Resolv
:: DNS :: Resource :: TXT (11) -
RubyVM
:: InstructionSequence (22)
モジュール
-
CGI
:: QueryExtension :: Value (22) - Forwardable (11)
-
RubyVM
:: AbstractSyntaxTree (2) -
Socket
:: Constants (11)
キーワード
-
SO
_ NREAD (11) - Transitive (11)
- filter (33)
-
first
_ lineno (11) - generate (11)
-
get
_ attribute _ ns (11) -
insert
_ after (11) -
insert
_ before (11) - instance (22)
-
instance
_ delegate (11) - last (11)
- new (22)
- of (2)
- open (44)
- parse (22)
- read (11)
- readlines (11)
-
to
_ a (11) - tsort (11)
検索結果
先頭5件
-
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='<'/>
</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
//}... -
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
id,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
id,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