391件ヒット
[201-300件を表示]
(0.191秒)
種類
- インスタンスメソッド (329)
- 特異メソッド (36)
- 変数 (14)
- クラス (12)
ライブラリ
- ビルトイン (391)
クラス
-
ARGF
. class (12) - Bignum (3)
-
Enumerator
:: Lazy (93) - Fixnum (3)
- Integer (36)
- Method (7)
- Module (12)
- Object (12)
- Proc (7)
-
Process
:: Status (12) - Range (12)
-
RubyVM
:: InstructionSequence (72) - String (84)
モジュール
- Kernel (14)
キーワード
-
$ -K (7) -
$ KCODE (7) - Numeric (12)
- [] (24)
-
absolute
_ path (12) -
base
_ label (12) - chunk (24)
- compile (12)
- gsub (48)
- label (12)
- new (24)
- path (12)
- prepend (12)
-
singleton
_ class (12) -
slice
_ after (22) -
slice
_ before (36) -
slice
_ when (11) - sub (36)
-
to
_ io (12)
検索結果
先頭5件
-
Enumerator
:: Lazy # slice _ before(pattern) -> Enumerator :: Lazy (8006.0) -
Enumerable#slice_before と同じですが、配列ではなく Enumerator::Lazy を返します。
...//emlist[例][ruby]{
1.step.lazy.slice_before { |e| e.even? }
# => #<Enumerator::Lazy: #<Enumerator: #<Enumerator::Generator:0x00007f9f31844ce8>:each>>
1.step.lazy.slice_before { |e| e % 3 == 0 }.take(5).force
# => [[1, 2], [3, 4, 5], [6, 7, 8], [9, 10, 11], [12, 13, 14]]
//}
@see Enumerable#slice... -
Enumerator
:: Lazy # slice _ when {|elt _ before , elt _ after| bool } -> Enumerator :: Lazy (8006.0) -
Enumerable#slice_when と同じですが、配列ではなく Enumerator::Lazy を返します。
...][ruby]{
1.step.lazy.slice_when { |i, j| (i + j) % 5 == 0 }
# => #<Enumerator::Lazy: #<Enumerator: #<Enumerator::Generator:0x00007fce84118348>:each>>
1.step.lazy.slice_when { |i, j| (i + j) % 5 == 0 }.take(5).force
# => [[1, 2], [3, 4, 5, 6, 7], [8, 9, 10, 11, 12], [13, 14, 15, 16, 17], [18, 19, 20... -
Integer
# [](nth) -> Integer (8006.0) -
nth 番目のビット(最下位ビット(LSB)が 0 番目)が立っている時 1 を、そうでなければ 0 を返します。
...> 0000000000000000011001100101010
a = 9**15
50.downto(0) {|n| print a[n] }
# => 000101110110100000111000011110010100111100010111001
//}
n[i] は (n >> i) & 1 と等価なので、負のインデックスは常に 0 を返します。
//emlist[][ruby]{
p 255[-1] # => 0
//}
self[nth]=bit (つま... -
Numeric (8006.0)
-
数値を表す抽象クラスです。Integer や Float などの数値クラス は Numeric のサブクラスとして実装されています。
...o o - -
>= | - - o o o - -
>> | - - o o - - -
[] | - - o......> | - o o - -
>= | - o o - -
>> | - o - - -
[] | - o - - -... -
Object
# singleton _ class -> Class (8006.0) -
レシーバの特異クラスを返します。 まだ特異クラスがなければ、新しく作成します。
...します。
@raise TypeError レシーバが Integer、Float、Symbol の場合に発生します。
//emlist[][ruby]{
Object.new.singleton_class #=> #<Class:#<Object:0xb7ce1e24>>
String.singleton_class #=> #<Class:String>
nil.singleton_class #=> NilClass
//}
@see Object#class... -
Range
. new(first , last , exclude _ end = false) -> Range (8006.0) -
first から last までの範囲オブジェクトを生成して返しま す。
...) # => 1...10
//}
//emlist[例: 日付オブジェクトの範囲オブジェクトの場合][ruby]{
require 'date'
Range.new(Date.today, Date.today >> 1).each {|d| puts d }
# => 2017-09-16
# 2017-09-17
# ...
# 2017-10-16
//}
//emlist[例: IPアドレスの範囲オブジェクトの場... -
RubyVM
:: InstructionSequence # absolute _ path -> String | nil (8006.0) -
self が表す命令シーケンスの絶対パスを返します。
...例1:irb で実行した場合
iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
# => <RubyVM::InstructionSequence:<compiled>@<compiled>>
iseq.absolute_path
# => nil
例2: RubyVM::InstructionSequence.compile_file を使用した場合
# /tmp/method.rb
def hello
puts "hell... -
RubyVM
:: InstructionSequence # base _ label -> String (8006.0) -
self が表す命令シーケンスの基本ラベルを返します。
...例1:irb で実行した場合
iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
# => <RubyVM::InstructionSequence:<compiled>@<compiled>>
iseq.base_label
# => "<compiled>"
例2: RubyVM::InstructionSequence.compile_file を使用した場合
# /tmp/method.rb
def hello
puts... -
RubyVM
:: InstructionSequence # label -> String (8006.0) -
self が表す命令シーケンスのラベルを返します。通常、メソッド名、クラス名、 モジュール名などで構成されます。
...例1:irb で実行した場合
iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
# => <RubyVM::InstructionSequence:<compiled>@<compiled>>
iseq.label
# => "<compiled>"
例2: RubyVM::InstructionSequence.compile_file を使用した場合
# /tmp/method.rb
def hello
puts "hel... -
RubyVM
:: InstructionSequence # path -> String (8006.0) -
self が表す命令シーケンスの相対パスを返します。
...例1:irb で実行した場合
iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
# => <RubyVM::InstructionSequence:<compiled>@<compiled>>
iseq.path
# => "<compiled>"
例2: RubyVM::InstructionSequence.compile_file を使用した場合
# /tmp/method.rb
def hello
puts "hell...