1185件ヒット
[101-200件を表示]
(0.166秒)
別のキーワード
ライブラリ
- ビルトイン (778)
-
cgi
/ core (24) - csv (114)
- date (4)
- forwardable (24)
- matrix (12)
- prettyprint (1)
- psych (12)
-
rexml
/ document (216)
クラス
- Array (48)
- CSV (60)
-
CSV
:: FieldInfo (24) -
CSV
:: Row (30) - Date (2)
- DateTime (2)
-
Enumerator
:: ArithmeticSequence (14) -
Enumerator
:: Lazy (90) -
File
:: Stat (12) - Matrix (12)
- Object (48)
- PrettyPrint (1)
-
Psych
:: Handler (12) -
REXML
:: Attributes (144) -
REXML
:: Element (36) -
REXML
:: Parent (24) - Range (118)
-
RubyVM
:: AbstractSyntaxTree :: Node (14) -
RubyVM
:: InstructionSequence (24) - String (216)
-
Thread
:: Backtrace :: Location (36) - Time (2)
モジュール
-
CGI
:: QueryExtension :: Value (24) - Enumerable (156)
- Forwardable (24)
-
REXML
:: Node (12)
キーワード
- << (12)
- <=> (12)
- [] (84)
- []= (12)
-
add
_ row (12) - alias (12)
- attribute (12)
- begin (12)
-
chunk
_ while (12) -
col
_ sep (12) - deconstruct (3)
-
deconstruct
_ keys (9) - delegate (12)
- delete (12)
-
delete
_ all (12) - each (24)
-
each
_ attribute (12) - eager (6)
- end (12)
-
enum
_ for (48) - fields (12)
-
find
_ first _ recursive (12) - first? (1)
-
first
_ column (7) -
first
_ lineno (19) -
first
_ minor (12) -
get
_ attribute (12) -
get
_ attribute _ ns (12) - header (12)
- index (12)
- inject (36)
-
insert
_ after (12) -
insert
_ before (12) -
instance
_ delegate (12) - label (12)
- last (60)
- lazy (12)
- length (12)
- lineno (12)
- min (46)
- namespaces (12)
- path (12)
- prefixes (12)
- puts (12)
- reduce (36)
- root (12)
-
root
_ node (12) - size (12)
- slice (72)
- slice! (72)
-
slice
_ before (24) -
slice
_ when (12) - take (12)
-
take
_ while (24) -
to
_ a (12) -
to
_ enum (48) -
values
_ at (12)
検索結果
先頭5件
-
RubyVM
:: InstructionSequence # first _ lineno -> Integer (6214.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... -
RubyVM
:: AbstractSyntaxTree :: Node # first _ column -> Integer (6208.0) -
ソースコード中で、self を表すテキストが最初に現れる列番号を返します。
...ソースコード中で、self を表すテキストが最初に現れる列番号を返します。
列番号は0-originで、バイト単位で表されます。
//emlist[][ruby]{
node = RubyVM::AbstractSyntaxTree.parse('1 + 2')
p node.first_column # => 0
//}... -
RubyVM
:: AbstractSyntaxTree :: Node # first _ lineno -> Integer (6208.0) -
ソースコード中で、self を表すテキストが最初に現れる行番号を返します。
...ソースコード中で、self を表すテキストが最初に現れる行番号を返します。
行番号は1-originです。
//emlist[][ruby]{
node = RubyVM::AbstractSyntaxTree.parse('1 + 2')
p node.first_lineno # => 1
//}... -
Matrix
# first _ minor(row , column) -> Matrix (6202.0) -
self から第 row 行と第 column 列を取り除いた行列を返します。
self から第 row 行と第 column 列を取り除いた行列を返します。
@param row 行
@param column 列
@raise ArgumentError row, column が行列の行数/列数を越えている場合に発生します。 -
REXML
:: Node # find _ first _ recursive {|node| . . . } -> REXML :: Node | nil (6202.0) -
self とその各 element node を引数とし、ブロックを呼び出し、 そのブロックの返り値が真であった最初の node を返します。
self とその各 element node を引数とし、ブロックを呼び出し、
そのブロックの返り値が真であった最初の node を返します。
見付からなかった場合は nil を返します。 -
File
:: Stat # <=>(o) -> Integer | nil (6107.0) -
ファイルの最終更新時刻を比較します。self が other よりも 新しければ正の数を、等しければ 0 を古ければ負の数を返します。 比較できない場合は nil を返します。
...fp1 = Tempfile.open("first")
fp1.print "古い方\n"
sleep(1)
fp2 = Tempfile.open("second")
fp2.print "新しい方\n"
p File::Stat.new(fp1.path) <=> File::Stat.new(fp2.path) #=> -1
p File::Stat.new(fp2.path) <=> File::Stat.new(fp1.path) #=> 1
p File::Stat.new(fp1.path) <=> fp2.path #=> nil
//}... -
CGI
:: QueryExtension :: Value # last -> self (3102.0) -
@todo
@todo -
REXML
:: Attributes # namespaces -> { String => String } (213.0) -
self の中で宣言されている名前空間の集合を返します。
...p://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
p doc.root.attributes.namespaces
# => {"foo"=>"http://example.org/foo", "bar"=>"http://example.org/bar"}
p a.attributes.namespaces
# => {}
//}... -
Enumerable
# inject(init = self . first) {|result , item| . . . } -> object (203.0) -
リストのたたみこみ演算を行います。
...算する。
p [2, 3, 4, 5].inject {|result, item| result + item } #=> 14
# 自乗和を計算する。初期値をセットする必要がある。
p [2, 3, 4, 5].inject(0) {|result, item| result + item**2 } #=> 54
//}
この式は以下のように書いても同じ結果が得られま......す。
//emlist[例][ruby]{
result = 0
[1, 2, 3, 4, 5].each {|v| result += v }
p result # => 15
p [1, 2, 3, 4, 5].inject(:+) #=> 15
p ["b", "c", "d"].inject("abbccddde", :squeeze) #=> "abcde"
//}... -
Enumerable
# reduce(init = self . first) {|result , item| . . . } -> object (203.0) -
リストのたたみこみ演算を行います。
...算する。
p [2, 3, 4, 5].inject {|result, item| result + item } #=> 14
# 自乗和を計算する。初期値をセットする必要がある。
p [2, 3, 4, 5].inject(0) {|result, item| result + item**2 } #=> 54
//}
この式は以下のように書いても同じ結果が得られま......す。
//emlist[例][ruby]{
result = 0
[1, 2, 3, 4, 5].each {|v| result += v }
p result # => 15
p [1, 2, 3, 4, 5].inject(:+) #=> 15
p ["b", "c", "d"].inject("abbccddde", :squeeze) #=> "abcde"
//}...