ライブラリ
- ビルトイン (9358)
クラス
-
ARGF
. class (348) - Array (980)
- BasicObject (84)
- Bignum (51)
- Binding (30)
- Class (12)
- Complex (78)
- Data (27)
- Dir (104)
- Enumerator (72)
-
Enumerator
:: ArithmeticSequence (14) -
Enumerator
:: Chain (14) -
Enumerator
:: Lazy (24) - Exception (48)
- Fiber (30)
- File (24)
-
File
:: Stat (12) - Fixnum (57)
- Float (150)
- FrozenError (6)
- Hash (590)
- IO (516)
- Integer (531)
- MatchData (108)
- Method (139)
- Module (502)
- Mutex (8)
- NameError (20)
- Numeric (371)
- Object (306)
- Proc (62)
-
Process
:: Status (36) - Random (36)
- Range (140)
- Rational (87)
- Refinement (4)
- Regexp (12)
-
RubyVM
:: AbstractSyntaxTree :: Node (49) -
RubyVM
:: InstructionSequence (120) - Set (84)
- SignalException (24)
- String (1475)
- Struct (155)
- Symbol (309)
- SystemCallError (12)
- Thread (157)
-
Thread
:: Backtrace :: Location (72) -
Thread
:: ConditionVariable (30) -
Thread
:: Mutex (40) -
Thread
:: Queue (10) -
Thread
:: SizedQueue (10) - ThreadGroup (36)
- Time (199)
- TracePoint (96)
- UnboundMethod (59)
- UncaughtThrowError (11)
モジュール
- Comparable (27)
- Enumerable (361)
- ObjectSpace (36)
- Process (12)
- Warning (9)
キーワード
- ! (12)
- != (12)
- !~ (12)
- % (38)
- & (24)
- * (12)
- ** (12)
- + (24)
- +@ (22)
- - (12)
- -@ (61)
-
/ (12) - < (49)
- << (53)
- <= (49)
- <=> (120)
- == (108)
- === (59)
- =~ (24)
- > (49)
- >= (49)
- >> (26)
- Binding (12)
- Comparable (12)
- NoMethodError (12)
- Numeric (12)
- Refinement (4)
- UnboundMethod (12)
- [] (174)
- []= (84)
-
_ dump (12) - abs (30)
- abs2 (12)
-
absolute
_ path (24) - add (15)
- add? (3)
-
alias
_ method (7) - allbits? (8)
- anybits? (8)
- append (8)
-
append
_ as _ bytes (1) -
append
_ features (12) - autoload (12)
- b (12)
-
backtrace
_ locations (24) -
base
_ label (24) - between? (12)
- bind (12)
-
bind
_ call (12) - binmode (24)
-
bit
_ length (18) - broadcast (10)
- bsearch (24)
-
bsearch
_ index (20) - byterindex (3)
- bytes (52)
- bytesplice (10)
- call (24)
- capitalize (12)
- capitalize! (12)
- casecmp (12)
- casecmp? (9)
- cause (12)
- ceil (12)
- ceildiv (3)
- center (12)
- chars (52)
- children (14)
- chomp (12)
- chomp! (12)
- chop! (12)
- chr (36)
-
chunk
_ while (12) - clamp (15)
- class (12)
-
class
_ eval (24) -
class
_ exec (12) - clear (51)
-
clock
_ gettime (12) - clone (24)
- close (44)
-
close
_ on _ exec= (12) - closed? (12)
- codepoints (52)
- coerce (36)
- collect! (27)
- combination (24)
- compact (25)
- compact! (21)
-
compare
_ by _ identity (12) - concat (42)
- conj (12)
- conjugate (12)
-
const
_ added (3) - count (12)
- cover? (14)
- crypt (12)
- curry (22)
- deconstruct (3)
-
deconstruct
_ keys (9) - dedup (3)
- default (24)
-
define
_ finalizer (24) -
define
_ singleton _ method (24) -
defined
_ class (12) - delete (15)
- delete! (12)
- delete? (3)
-
delete
_ if (51) -
delete
_ prefix! (8) -
delete
_ suffix! (8) -
deprecate
_ constant (12) - difference (7)
- dig (30)
- digits (24)
- disable (24)
- disasm (12)
- disassemble (12)
- disjoint? (3)
- display (12)
- div (12)
- divmod (42)
- downcase (12)
- downcase! (12)
- downto (24)
- dup (24)
- each (329)
-
each
_ byte (72) -
each
_ char (72) -
each
_ child (14) -
each
_ codepoint (72) -
each
_ cons (8) -
each
_ entry (24) -
each
_ grapheme _ cluster (16) -
each
_ index (24) -
each
_ key (48) -
each
_ line (144) -
each
_ pair (72) -
each
_ slice (8) -
each
_ value (48) -
each
_ with _ index (24) - enable (24)
- enabled? (12)
- enclose (12)
- encode (36)
- encode! (24)
-
end
_ with? (18) - entries (7)
-
enum
_ for (24) - eql? (30)
- equal? (48)
- eval (24)
- even? (6)
- exception (24)
- exit (12)
- extend (12)
-
extend
_ object (12) - extended (12)
- fdiv (54)
-
fetch
_ values (22) - fileno (11)
- fill (72)
- filter! (45)
- finite? (9)
-
first
_ column (7) -
first
_ lineno (19) - flatten (15)
- flatten! (15)
- floor (12)
- flush (12)
-
force
_ encoding (12) - freeze (24)
- friday? (12)
- gcd (12)
- gcdlcm (12)
- getbyte (12)
- getc (12)
- gmt? (12)
- gmtime (12)
-
grapheme
_ clusters (16) - gsub! (48)
- hash (75)
- hex (12)
- i (12)
-
import
_ methods (4) - include (24)
- include? (12)
- included (12)
-
included
_ modules (12) - infinite? (9)
- inherited (12)
-
initialize
_ copy (12) - inject (36)
- insert (24)
- inspect (143)
-
instance
_ eval (24) -
instance
_ exec (12) -
instance
_ method (12) - intern (12)
- intersect? (3)
- itself (12)
- join (24)
-
keep
_ if (75) - kill (12)
- label (24)
-
last
_ column (7) -
last
_ lineno (7) - lazy (12)
- lcm (12)
- length (24)
- lineno (12)
- lines (108)
- list (12)
- ljust (12)
-
local
_ variables (10) - localtime (24)
- lock (12)
- lstrip! (12)
- magnitude (30)
- main (12)
- map! (27)
-
marshal
_ load (12) - match (36)
- match? (18)
-
max
_ by (48) - merge (27)
- merge! (36)
-
module
_ eval (24) -
module
_ exec (12) - modulo (12)
- monday? (12)
- name (10)
- name= (10)
- names (12)
- negative? (29)
- new (24)
- next (36)
- next! (12)
-
next
_ float (11) - nobits? (8)
- nonzero? (12)
- odd? (6)
- offset (24)
- ord (12)
- overlap? (2)
- owned? (12)
- partition (12)
- path (36)
-
pending
_ interrupt? (12) - permutation (24)
- polar (12)
- pos= (12)
- positive? (29)
- pow (24)
- pred (12)
- prepend (20)
-
prepend
_ features (12) - prepended (12)
-
prev
_ float (11) - printf (12)
- private (7)
-
private
_ class _ method (24) -
private
_ constant (12) - product (24)
-
proper
_ subset? (3) -
proper
_ superset? (3) - public (55)
-
public
_ class _ method (24) -
public
_ constant (12) -
public
_ instance _ method (12) - push (12)
- putc (12)
- puts (12)
- quo (12)
- raise (18)
- rand (36)
- rationalize (12)
- receiver (27)
- rect (12)
- rectangular (12)
- reduce (36)
- rehash (12)
- reject (24)
- reject! (51)
- remainder (27)
-
remove
_ method (12) - reopen (36)
-
repeated
_ combination (24) -
repeated
_ permutation (24) - replace (51)
- reset (3)
- resume (12)
- reverse (12)
- reverse! (24)
-
reverse
_ each (52) - rewind (31)
- rindex (12)
- rjust (12)
- rotate! (12)
- round (12)
- rpartition (12)
- rstrip! (12)
- run (12)
-
safe
_ level (5) - sample (48)
- saturday? (12)
- scan (24)
- scrub (36)
- scrub! (36)
- seek (12)
- select! (75)
-
set
_ encoding (72) - shift (12)
- shuffle! (24)
- signal (10)
- signm (12)
- signo (12)
-
singleton
_ class? (12) -
singleton
_ methods (12) - size (37)
- skip (12)
- slice (132)
-
slice
_ when (12) - sort (24)
- sort! (24)
-
sort
_ by (24) -
sort
_ by! (24) -
source
_ location (7) - split (14)
- squeeze! (12)
-
start
_ with? (18) - step (124)
- strip! (12)
- sub! (36)
- subset? (3)
- subtract (3)
- succ (46)
- succ! (12)
- sum (24)
- sunday? (12)
-
super
_ method (22) - superset? (3)
- swapcase (12)
- swapcase! (12)
- synchronize (12)
- taint (9)
- tally (10)
- tap (12)
- terminate (12)
- then (14)
- thursday? (12)
- times (24)
-
to
_ a (34) -
to
_ ary (12) -
to
_ c (24) -
to
_ enum (24) -
to
_ f (24) -
to
_ h (82) -
to
_ hash (12) -
to
_ i (12) -
to
_ int (24) -
to
_ io (12) -
to
_ path (12) -
to
_ proc (46) -
to
_ s (104) -
to
_ str (12) -
to
_ sym (12) - tr! (12)
-
tr
_ s! (12) -
transform
_ keys! (21) -
transform
_ values! (18) - truncate (12)
- trust (9)
- tuesday? (12)
- type (7)
- unbind (12)
-
undef
_ method (12) -
undefine
_ finalizer (12) - undump (8)
-
unicode
_ normalize (11) -
unicode
_ normalize! (11) -
unicode
_ normalized? (11) - union (7)
- uniq (48)
- uniq! (24)
- unlock (12)
- unshift (12)
- untaint (9)
- untrust (9)
- upcase (12)
- upcase! (12)
- update (48)
- upto (36)
- using (24)
- utc (12)
- utc? (12)
- value (12)
- wait (10)
- wakeup (12)
- warn (9)
- wednesday? (12)
- with (3)
-
yield
_ self (16) - zero? (3)
- zip (48)
- | (12)
- ~ (12)
検索結果
先頭5件
-
Object
# tap {|x| . . . } -> self (8139.0) -
self を引数としてブロックを評価し、self を返します。
...
self を引数としてブロックを評価し、self を返します。
メソッドチェインの途中で直ちに操作結果を表示するために
メソッドチェインに "入り込む" ことが、このメソッドの主目的です。
//emlist[][ruby]{
(1..10) .ta......p {|x| puts "original: #{x}" }
.to_a .tap {|x| puts "array: #{x}" }
.select {|x| x.even? } .tap {|x| puts "evens: #{x}" }
.map {|x| x*x } .tap {|x| puts "squares: #{x}" }
//}
@see Object#yield_self... -
Module
# append _ features(module _ or _ class) -> self (8135.0) -
モジュール(あるいはクラス)に self の機能を追加します。
...モジュール(あるいはクラス)に self の機能を追加します。
このメソッドは Module#include の実体であり、
include を Ruby で書くと以下のように定義できます。
//emlist[例][ruby]{
def include(*modules)
modules.reverse_each do |mod|
# append_fea......tures や included はプライベートメソッドなので
# 直接 mod.append_features(self) などとは書けない
mod.__send__(:append_features, self)
mod.__send__(:included, self)
end
end
//}
@see Module#included... -
Array
# delete _ if {|x| . . . } -> self (8134.0) -
要素を順番にブロックに渡して評価し、その結果が真になった要素をすべて削除します。 delete_if は常に self を返しますが、reject! は要素が 1 つ以上削除されれば self を、 1 つも削除されなければ nil を返します。
...渡して評価し、その結果が真になった要素をすべて削除します。
delete_if は常に self を返しますが、reject! は要素が 1 つ以上削除されれば self を、
1 つも削除されなければ nil を返します。
ブロックが与えられなかった場合... -
Array
# reject! {|x| . . . } -> self | nil (8134.0) -
要素を順番にブロックに渡して評価し、その結果が真になった要素をすべて削除します。 delete_if は常に self を返しますが、reject! は要素が 1 つ以上削除されれば self を、 1 つも削除されなければ nil を返します。
...渡して評価し、その結果が真になった要素をすべて削除します。
delete_if は常に self を返しますが、reject! は要素が 1 つ以上削除されれば self を、
1 つも削除されなければ nil を返します。
ブロックが与えられなかった場合... -
String
# -@ -> String | self (8134.0) -
self が freeze されている文字列の場合、self を返します。 freeze されていない場合は元の文字列の freeze された (できる限り既存の) 複製を返します。
...
self が freeze されている文字列の場合、self を返します。
freeze されていない場合は元の文字列の freeze された (できる限り既存の) 複製を返します。
//emlist[例][ruby]{
# frozen_string_literal: false
original_text = "text"
frozen_text = -original_... -
String
# concat(*arguments) -> self (8134.0) -
self に複数の文字列を破壊的に連結します。
...
self に複数の文字列を破壊的に連結します。
引数の値が整数である場合は Integer#chr の結果に相当する文字を末尾に追加します。追加する文字のエンコーディングは self.encoding です。
self を返します。
@param arguments 複数の... -
String
# dedup -> String | self (8134.0) -
self が freeze されている文字列の場合、self を返します。 freeze されていない場合は元の文字列の freeze された (できる限り既存の) 複製を返します。
...
self が freeze されている文字列の場合、self を返します。
freeze されていない場合は元の文字列の freeze された (できる限り既存の) 複製を返します。
//emlist[例][ruby]{
# frozen_string_literal: false
original_text = "text"
frozen_text = -original_... -
Thread
# join -> self (8134.0) -
スレッド self の実行が終了するまで、カレントスレッドを停止し ます。self が例外により終了していれば、その例外がカレントス レッドに対して発生します。
...スレッド self の実行が終了するまで、カレントスレッドを停止し
ます。self が例外により終了していれば、その例外がカレントス
レッドに対して発生します。
limit を指定して、limit 秒過ぎても自身が終了しない場合、nil... -
Thread
# join(limit) -> self | nil (8134.0) -
スレッド self の実行が終了するまで、カレントスレッドを停止し ます。self が例外により終了していれば、その例外がカレントス レッドに対して発生します。
...スレッド self の実行が終了するまで、カレントスレッドを停止し
ます。self が例外により終了していれば、その例外がカレントス
レッドに対して発生します。
limit を指定して、limit 秒過ぎても自身が終了しない場合、nil... -
Hash
# to _ h -> self | Hash (8133.0) -
self を返します。Hash クラスのサブクラスから呼び出した場合は self を Hash オブジェクトに変換します。
...
self を返します。Hash クラスのサブクラスから呼び出した場合は
self を Hash オブジェクトに変換します。
//emlist[例][ruby]{
hash = {}
p hash.to_h # => {}
p hash.to_h == hash # => true
class MyHash < Hash;end
my_hash = MyHash.new
p my_hash.to_h # =>... -
Object
# tap {|x| . . . } -> self (8133.0) -
self を引数としてブロックを評価し、self を返します。
...
self を引数としてブロックを評価し、self を返します。
メソッドチェインの途中で直ちに操作結果を表示するために
メソッドチェインに "入り込む" ことが、このメソッドの主目的です。
//emlist[][ruby]{
(1..10) .ta... -
String
# +@ -> String | self (8133.0) -
self が freeze されている文字列の場合、元の文字列の複製を返します。 freeze されていない場合は self を返します。
...
self が freeze されている文字列の場合、元の文字列の複製を返します。
freeze されていない場合は self を返します。
//emlist[例][ruby]{
# frozen_string_literal: false
original_text = "text"
unfrozen_text = +original_text
unfrozen_text.frozen?...
