1338件ヒット
[101-200件を表示]
(0.151秒)
ライブラリ
- ビルトイン (667)
-
cgi
/ core (22) - csv (220)
- forwardable (11)
- matrix (11)
- open3 (44)
- prettyprint (1)
- psych (17)
- resolv (11)
-
rexml
/ document (176) -
rubygems
/ commands / which _ command (11) - socket (22)
クラス
- Array (33)
- CSV (176)
-
CSV
:: FieldInfo (22) -
CSV
:: Row (22) - Enumerator (5)
-
Enumerator
:: ArithmeticSequence (12) -
Enumerator
:: Lazy (33) -
File
:: Stat (11) - IO (11)
- Matrix (11)
- Object (44)
- PrettyPrint (1)
-
Psych
:: Handler (11) -
REXML
:: Attributes (121) -
REXML
:: Element (11) -
REXML
:: Parent (22) -
REXML
:: XPath (11) - Range (86)
-
Resolv
:: DNS :: Resource :: TXT (11) -
RubyVM
:: AbstractSyntaxTree :: Node (12) -
RubyVM
:: InstructionSequence (22) - Socket (11)
- String (198)
-
Thread
:: Backtrace :: Location (33)
モジュール
-
CGI
:: QueryExtension :: Value (22) - Enumerable (132)
- Forwardable (11)
- Kernel (33)
- Open3 (44)
- Psych (6)
-
REXML
:: Node (11) -
RubyVM
:: AbstractSyntaxTree (2) -
Socket
:: Constants (11)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (11) - <=> (11)
-
NEWS for Ruby 2
. 0 . 0 (11) -
NEWS for Ruby 3
. 0 . 0 (4) - Ruby用語集 (11)
-
SO
_ NREAD (22) - WhichCommand (11)
- [] (77)
- alias (11)
- attribute (11)
- begin (11)
- binwrite (11)
- caller (33)
-
cgi
/ session (11) -
chunk
_ while (11) -
col
_ sep (11) - convert (22)
- delete (11)
-
delete
_ all (11) - each (22)
-
each
_ attribute (11) -
enum
_ for (22) - fields (11)
-
find
_ first _ recursive (11) - first? (1)
-
first
_ column (6) -
first
_ lineno (17) -
first
_ minor (11) - generate (11)
-
get
_ attribute (11) -
get
_ attribute _ ns (11) - header (11)
- index (11)
- inject (33)
-
insert
_ after (11) -
insert
_ before (11) - instance (22)
-
instance
_ delegate (11) - label (11)
- last (22)
- length (11)
- lineno (11)
- min (42)
- namespaces (11)
- new (44)
- of (2)
- open (44)
- parse (22)
- path (11)
-
pipeline
_ rw (22) -
pipeline
_ w (22) - prefixes (11)
- produce (5)
- rdoc (11)
- read (11)
- readlines (11)
- reduce (33)
-
ruby 1
. 6 feature (11) -
ruby 1
. 8 . 2 feature (11) -
ruby 1
. 9 feature (11) -
safe
_ load (6) - size (11)
- slice (66)
- slice! (66)
-
slice
_ before (22) -
slice
_ when (11) -
take
_ while (22) -
to
_ a (11) -
to
_ enum (22) - tsort (11)
-
values
_ at (11) - リテラル (11)
- 演算子式 (11)
検索結果
先頭5件
-
RubyVM
:: InstructionSequence # first _ lineno -> Integer (15319.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... -
PrettyPrint
# first? -> bool (12313.0) -
このメソッドは obsolete です。
...です。
現在のグループで first? に対する最初の呼び出しかどうかを判定する
述語です。これはカンマで区切られた値を整形するのに有用です。
pp.group(1, '[', ']') {
xxx.each {|yyy|
unless pp.first?
pp.text ','
pp.bre......akable
end
... pretty printing yyy ...
}
}... -
RubyVM
:: AbstractSyntaxTree :: Node # first _ column -> Integer (12313.0) -
ソースコード中で、self を表すテキストが最初に現れる列番号を返します。
...ソースコード中で、self を表すテキストが最初に現れる列番号を返します。
列番号は0-originで、バイト単位で表されます。
//emlist[][ruby]{
node = RubyVM::AbstractSyntaxTree.parse('1 + 2')
p node.first_column # => 0
//}... -
RubyVM
:: AbstractSyntaxTree :: Node # first _ lineno -> Integer (12313.0) -
ソースコード中で、self を表すテキストが最初に現れる行番号を返します。
...ソースコード中で、self を表すテキストが最初に現れる行番号を返します。
行番号は1-originです。
//emlist[][ruby]{
node = RubyVM::AbstractSyntaxTree.parse('1 + 2')
p node.first_lineno # => 1
//}... -
Matrix
# first _ minor(row , column) -> Matrix (12301.0) -
self から第 row 行と第 column 列を取り除いた行列を返します。
...self から第 row 行と第 column 列を取り除いた行列を返します。
@param row 行
@param column 列
@raise ArgumentError row, column が行列の行数/列数を越えている場合に発生します。... -
REXML
:: Node # find _ first _ recursive {|node| . . . } -> REXML :: Node | nil (12301.0) -
self とその各 element node を引数とし、ブロックを呼び出し、 そのブロックの返り値が真であった最初の node を返します。
...self とその各 element node を引数とし、ブロックを呼び出し、
そのブロックの返り値が真であった最初の node を返します。
見付からなかった場合は nil を返します。... -
REXML
:: Attributes # each _ attribute {|attribute| . . . } -> () (9306.0) -
各属性に対しブロックを呼び出します。
...ribute オブジェクトで渡されます。
//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 (9306.0) -
name という名前の属性を取得します。
...得します。
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://e......xample.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 (9306.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
//}... -
IO
. binwrite(path , string , offset=nil) -> Integer (6412.0) -
path で指定されるファイルを開き、string を書き込み、 閉じます。
...path で指定されるファイルを開き、string を書き込み、
閉じます。
ファイルを開くときの mode が "rb:ASCII-8BIT" で、バイナリモードが有効
である点以外は IO.write と同じです。
Kernel.#open と同様 path の先頭が "|" ならば、"|" に......名文字列
@param string 書き込む文字列
@param offset 書き込み開始位置
//emlist[例][ruby]{
# 8x8の真っ白なPNG画像データ。
png = 'iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAAAAADhZOFXAAAADklEQVQIW2P4DwUMlDEA98A/wTjP
QBoAAAAASUVORK5CYII='.unpack('m').first
# 期待する先頭16......{|c| '%02x' % c }.join(' ')
# => 89 50 4e 47 0d 0a 1a 0a 00 00 00 0d 49 48 44 52
# binwriteを使用した場合: どの環境でも正しく保存できる。
IO.binwrite('white.binmode.png', png)
puts IO.binread('white.binmode.png', 16).unpack('C*').map {|c| '%02x' % c }.join(' ')
# => 89 50 4e... -
Enumerable
# inject(init = self . first) {|result , item| . . . } -> object (6402.0) -
リストのたたみこみ演算を行います。
...リストのたたみこみ演算を行います。
最初に初期値 init と self の最初の要素を引数にブロックを実行します。
2 回目以降のループでは、前のブロックの実行結果と
self の次の要素を引数に順次ブロックを実行します。
そ......して最後の要素まで繰り返し、最後のブロックの実行結果を返します。
要素が存在しない場合は init を返します。
初期値 init を省略した場合は、
最初に先頭の要素と 2 番目の要素をブロックに渡します。
また要素が 1 つ......かなければブロックを実行せずに最初の要素を返します。
要素がなければブロックを実行せずに nil を返します。
@param init 最初の result の値です。任意のオブジェクトが渡せます。
@param sym ブロックの代わりに使われる...