ライブラリ
- ビルトイン (8929)
クラス
-
ARGF
. class (348) - Array (978)
- BasicObject (84)
- Bignum (51)
- Binding (30)
- Class (12)
- Complex (78)
- Data (27)
- Dir (104)
- Enumerator (72)
-
Enumerator
:: ArithmeticSequence (14) -
Enumerator
:: Chain (14) -
Enumerator
:: Lazy (12) - Exception (48)
- Fiber (30)
- File (24)
-
File
:: Stat (12) - Fixnum (57)
- Float (150)
- FrozenError (6)
- Hash (589)
- IO (516)
- Integer (531)
- MatchData (108)
- Method (139)
- Module (503)
- Mutex (8)
- NameError (20)
- Numeric (371)
- Object (306)
- Proc (62)
-
Process
:: Status (36) - Random (36)
- Range (127)
- Rational (87)
- Refinement (4)
- Regexp (12)
-
RubyVM
:: AbstractSyntaxTree :: Node (49) -
RubyVM
:: InstructionSequence (120) - Set (84)
- SignalException (24)
- String (1474)
- Struct (155)
- Symbol (309)
- 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)
キーワード
- ! (12)
- != (12)
- !~ (12)
- % (38)
- & (24)
- * (12)
- ** (12)
- + (24)
- +@ (22)
- - (12)
- -@ (61)
-
/ (12) - < (49)
- << (53)
- <= (49)
- <=> (120)
- == (108)
- === (47)
- =~ (24)
- > (49)
- >= (49)
- >> (26)
- [] (174)
- []= (84)
-
_ dump (12) - abs (30)
- abs2 (12)
-
absolute
_ path (24) - add (15)
- add? (3)
-
alias
_ method (8) - allbits? (8)
- anybits? (8)
- append (8)
-
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 (39)
- 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
_ 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 (305)
-
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 (24) -
each
_ line (144) -
each
_ pair (48) -
each
_ slice (8) -
each
_ value (24) -
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 (20) - fileno (11)
- fill (72)
- filter! (31)
- 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 (12)
- 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 (51) - 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)
- map! (27)
-
marshal
_ load (12) - match (36)
- match? (18)
-
max
_ by (48) - merge (27)
- merge! (24)
-
module
_ eval (24) -
module
_ exec (12) - modulo (12)
- monday? (12)
- name (10)
- name= (10)
- names (12)
- negative? (29)
- 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
_ class _ method (24) -
private
_ constant (12) - product (24)
-
proper
_ subset? (3) -
proper
_ superset? (3) - public (48)
-
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 (39)
- 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! (51)
-
set
_ encoding (72) - shift (12)
- shuffle! (24)
- signal (10)
- signm (12)
- signo (12)
-
singleton
_ class? (12) -
singleton
_ methods (12) - size (36)
- 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! (20) -
transform
_ values! (18) - truncate (12)
- trust (9)
- tuesday? (12)
- type (7)
- unbind (12)
-
undef
_ method (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 (24)
- upto (36)
- using (12)
- utc (12)
- utc? (12)
- value (12)
- wait (10)
- wakeup (12)
- wednesday? (12)
- with (3)
-
yield
_ self (16) - zero? (3)
- zip (48)
- | (12)
- ~ (12)
検索結果
先頭5件
-
TracePoint
# self -> object (26114.0) -
イベントを発生させたオブジェクトを返します。
...イベントを発生させたオブジェクトを返します。
以下のようにする事で同じ値を取得できます。
//emlist[例][ruby]{
trace.binding.eval('self')
//}
@see TracePoint#binding......返します。
以下のようにする事で同じ値を取得できます。
なお、self メソッドは binding が nil になる :c_call および :c_return イベントに対しても正しく動作します。
//emlist[例][ruby]{
trace.binding.eval('self')
//}
@see TracePoint#binding... -
Object
# yield _ self -> Enumerator (14155.0) -
self を引数としてブロックを評価し、ブロックの結果を返します。
...
self を引数としてブロックを評価し、ブロックの結果を返します。
//emlist[例][ruby]{
"my string".yield_self {|s| s.upcase } # => "MY STRING"
3.next.yield_self {|x| x**x }.to_s # => "256"
//}
値をメソッドチェインのパイプラインに次々と渡すの......ld_self {|url| URI(url).read }.
yield_self {|response| JSON.parse(response) }
//}
ブロックなしで呼び出されたときは Enumerator を返します。
例えば条件によって値を捨てるのに使えます。
//emlist[][ruby]{
# 条件にあうので何もしない
1.yield_self.d......etect(&:odd?) # => 1
# 条件に合わないので値を捨てる
2.yield_self.detect(&:odd?) # => nil
//}
@see Object#tap... -
Object
# yield _ self {|x| . . . } -> object (14155.0) -
self を引数としてブロックを評価し、ブロックの結果を返します。
...
self を引数としてブロックを評価し、ブロックの結果を返します。
//emlist[例][ruby]{
"my string".yield_self {|s| s.upcase } # => "MY STRING"
3.next.yield_self {|x| x**x }.to_s # => "256"
//}
値をメソッドチェインのパイプラインに次々と渡すの......ld_self {|url| URI(url).read }.
yield_self {|response| JSON.parse(response) }
//}
ブロックなしで呼び出されたときは Enumerator を返します。
例えば条件によって値を捨てるのに使えます。
//emlist[][ruby]{
# 条件にあうので何もしない
1.yield_self.d......etect(&:odd?) # => 1
# 条件に合わないので値を捨てる
2.yield_self.detect(&:odd?) # => nil
//}
@see Object#tap... -
Object
# itself -> object (14117.0) -
self を返します。
...
self を返します。
//emlist[][ruby]{
string = 'my string' # => "my string"
string.itself.object_id == string.object_id # => true
//}... -
Object
# yield _ self -> Enumerator (11149.0) -
self を引数としてブロックを評価し、ブロックの結果を返します。
...
self を引数としてブロックを評価し、ブロックの結果を返します。
//emlist[例][ruby]{
3.next.then {|x| x**x }.to_s # => "256"
"my string".yield_self {|s| s.upcase } # => "MY STRING"
//}
値をメソッドチェインのパイプラインに次々と渡すの......ld_self {|url| URI(url).read }.
yield_self {|response| JSON.parse(response) }
//}
ブロックなしで呼び出されたときは Enumerator を返します。
例えば条件によって値を捨てるのに使えます。
//emlist[][ruby]{
# 条件にあうので何もしない
1.yield_self.d......etect(&:odd?) # => 1
# 条件に合わないので値を捨てる
2.yield_self.detect(&:odd?) # => nil
//}
@see Object#tap... -
Object
# yield _ self {|x| . . . } -> object (11149.0) -
self を引数としてブロックを評価し、ブロックの結果を返します。
...
self を引数としてブロックを評価し、ブロックの結果を返します。
//emlist[例][ruby]{
3.next.then {|x| x**x }.to_s # => "256"
"my string".yield_self {|s| s.upcase } # => "MY STRING"
//}
値をメソッドチェインのパイプラインに次々と渡すの......ld_self {|url| URI(url).read }.
yield_self {|response| JSON.parse(response) }
//}
ブロックなしで呼び出されたときは Enumerator を返します。
例えば条件によって値を捨てるのに使えます。
//emlist[][ruby]{
# 条件にあうので何もしない
1.yield_self.d......etect(&:odd?) # => 1
# 条件に合わないので値を捨てる
2.yield_self.detect(&:odd?) # => nil
//}
@see Object#tap... -
Hash
# merge!(*others) {|key , self _ val , other _ val| . . . } -> self (8241.0) -
selfとothersのハッシュの内容を順番にマージ(統合)します。
...
selfとothersのハッシュの内容を順番にマージ(統合)します。
デフォルト値はselfの設定のままです。
self と others に同じキーがあった場合はブロック付きか否かで
判定方法が違います。ブロック付きのときはブロックを呼び......others マージ用のハッシュまたはメソッド to_hash でハッシュに変換できるオブジェクトです。
@return マージ後のselfを返します。
//emlist[][ruby]{
h1 = { "a" => 100, "b" => 200 }
h1.merge! #=> {"a"=>100, "b"=>200}
h1 #=> {"a"=>100,... -
Hash
# merge!(other) {|key , self _ val , other _ val| . . . } -> self (8241.0) -
selfとotherのハッシュの内容をマージ(統合)します。
...
selfとotherのハッシュの内容をマージ(統合)します。
デフォルト値はselfの設定のままです。
self と other に同じキーがあった場合はブロック付きか否かで
判定方法が違います。ブロック付きのときはブロックを呼び出して......other マージ用のハッシュまたはメソッド to_hash でハッシュに変換できるオブジェクトです。
@return マージ後のselfを返します。
//emlist[][ruby]{
h1 = { "a" => 100, "b" => 200 }
h2 = { "b" => 254, "c" => 300 }
h1.merge!(h2) # => {"a"=>100, "b"=>254, "c"=... -
Hash
# update(*others) {|key , self _ val , other _ val| . . . } -> self (8241.0) -
selfとothersのハッシュの内容を順番にマージ(統合)します。
...
selfとothersのハッシュの内容を順番にマージ(統合)します。
デフォルト値はselfの設定のままです。
self と others に同じキーがあった場合はブロック付きか否かで
判定方法が違います。ブロック付きのときはブロックを呼び......others マージ用のハッシュまたはメソッド to_hash でハッシュに変換できるオブジェクトです。
@return マージ後のselfを返します。
//emlist[][ruby]{
h1 = { "a" => 100, "b" => 200 }
h1.merge! #=> {"a"=>100, "b"=>200}
h1 #=> {"a"=>100,... -
Hash
# update(other) {|key , self _ val , other _ val| . . . } -> self (8241.0) -
selfとotherのハッシュの内容をマージ(統合)します。
...
selfとotherのハッシュの内容をマージ(統合)します。
デフォルト値はselfの設定のままです。
self と other に同じキーがあった場合はブロック付きか否かで
判定方法が違います。ブロック付きのときはブロックを呼び出して......other マージ用のハッシュまたはメソッド to_hash でハッシュに変換できるオブジェクトです。
@return マージ後のselfを返します。
//emlist[][ruby]{
h1 = { "a" => 100, "b" => 200 }
h2 = { "b" => 254, "c" => 300 }
h1.merge!(h2) # => {"a"=>100, "b"=>254, "c"=... -
Array
# permutation(n = self . length) { |p| block } -> self (8210.0) -
サイズ n の順列をすべて生成し,それを引数としてブロックを実行します。
...no permutations of length 4
//}
ブロックが与えられた場合、作成した配列の各要素を引数としてブロックを実
行して self を返します。
//emlist[例][ruby]{
a = [1, 2, 3]
result = []
a.permutation(2) {|e| result << e} # => [1,2,3]
result # => [[1,2],[1,3],[2,1],... -
String
# encode!(encoding , from _ encoding , options = nil) -> self (8163.0) -
self を指定したエンコーディングに変換し、自身を置き換えます。引数を2つ 与えた場合、第二引数は変換元のエンコーディングを意味します。さもなくば self のエンコーディングが使われます。変換後の self を返します。
...
self を指定したエンコーディングに変換し、自身を置き換えます。引数を2つ
与えた場合、第二引数は変換元のエンコーディングを意味します。さもなくば
self のエンコーディングが使われます。変換後の self を返します。......(gsub!などと異なり)変換が行なわれなくても self を返します。
@param encoding 変換先のエンコーディングを表す文字列か Encoding オブジェクトを指定します。
@param from_encoding 変換元のエンコーディングを表す文字列か Encodi......ng オブジェクトを指定します。
@return 変換後のself
//emlist[例][ruby]{
#coding:UTF-8
s = "いろは"
s.encode!("EUC-JP")
s.encode!(Encoding::UTF_8)
//}
@see String#encode... -
String
# encode!(encoding , options = nil) -> self (8163.0) -
self を指定したエンコーディングに変換し、自身を置き換えます。引数を2つ 与えた場合、第二引数は変換元のエンコーディングを意味します。さもなくば self のエンコーディングが使われます。変換後の self を返します。
...
self を指定したエンコーディングに変換し、自身を置き換えます。引数を2つ
与えた場合、第二引数は変換元のエンコーディングを意味します。さもなくば
self のエンコーディングが使われます。変換後の self を返します。......(gsub!などと異なり)変換が行なわれなくても self を返します。
@param encoding 変換先のエンコーディングを表す文字列か Encoding オブジェクトを指定します。
@param from_encoding 変換元のエンコーディングを表す文字列か Encodi......ng オブジェクトを指定します。
@return 変換後のself
//emlist[例][ruby]{
#coding:UTF-8
s = "いろは"
s.encode!("EUC-JP")
s.encode!(Encoding::UTF_8)
//}
@see String#encode...