ライブラリ
- ビルトイン (1331)
クラス
-
ARGF
. class (64) - Array (151)
- BasicObject (14)
- Binding (5)
- Class (4)
- Complex (37)
- Dir (9)
-
Encoding
:: Converter (16) -
Encoding
:: InvalidByteSequenceError (6) -
Encoding
:: UndefinedConversionError (4) - Enumerator (13)
-
Enumerator
:: Lazy (25) - Exception (6)
- FalseClass (3)
- Fiber (1)
- File (10)
-
File
:: Stat (7) - Float (31)
- Hash (80)
- IO (96)
- Integer (55)
- MatchData (16)
- Method (13)
- Module (75)
- NilClass (5)
- Numeric (43)
- Object (63)
-
ObjectSpace
:: WeakMap (2) - Proc (8)
-
Process
:: Status (3) - Random (6)
- Range (28)
- Rational (27)
- Regexp (10)
-
RubyVM
:: InstructionSequence (8) - String (150)
- Struct (9)
- Symbol (32)
- Thread (30)
-
Thread
:: Backtrace :: Location (6) -
Thread
:: ConditionVariable (3) -
Thread
:: Mutex (4) -
Thread
:: Queue (3) -
Thread
:: SizedQueue (8) - ThreadGroup (2)
- Time (12)
- TracePoint (14)
- TrueClass (3)
- UnboundMethod (9)
モジュール
- Comparable (7)
- Enumerable (93)
- GC (1)
- Warning (1)
キーワード
- ! (1)
- != (1)
- !~ (1)
- % (4)
- & (6)
- * (7)
- ** (4)
- + (7)
- +@ (2)
- - (7)
- -@ (6)
-
/ (3) - < (6)
- << (5)
- <= (6)
- <=> (10)
- == (20)
- === (8)
- =~ (4)
- > (6)
- >= (6)
- >> (2)
- [] (25)
- []= (14)
- ^ (4)
-
_ _ id _ _ (1) -
_ _ send _ _ (2) -
_ dump (1) -
_ load (1) -
abort
_ on _ exception (1) -
abort
_ on _ exception= (1) - abs (1)
- abs2 (1)
-
absolute
_ path (2) - add (1)
-
add
_ trace _ func (1) - advise (1)
-
alias
_ method (1) - alive? (1)
- allocate (1)
- ancestors (1)
- angle (2)
- any? (4)
-
append
_ features (1) - arg (2)
- assoc (2)
- at (1)
- atime (2)
- attr (3)
-
attr
_ accessor (1) -
attr
_ reader (1) -
attr
_ writer (1) - autoclose= (1)
- autoclose? (1)
- autoload (1)
- autoload? (1)
- backtrace (1)
-
backtrace
_ locations (3) -
base
_ label (2) - begin (2)
- between? (2)
- bind (1)
- binmode (2)
- binmode? (2)
- birthtime (2)
-
bit
_ length (1) - broadcast (1)
- bsearch (4)
-
bsearch
_ index (2) - bytes (5)
- bytesize (1)
- byteslice (3)
- call (3)
-
callee
_ id (1) - capitalize (2)
- capitalize! (1)
- captures (1)
- casecmp (2)
- casecmp? (2)
- ceil (4)
- center (1)
- chars (4)
- chmod (1)
- chomp (1)
- chomp! (1)
- chop (1)
- chop! (1)
- chown (1)
- chr (3)
- chunk (3)
-
chunk
_ while (2) - clamp (2)
- class (1)
-
class
_ eval (2) -
class
_ exec (1) -
class
_ variable _ defined? (1) -
class
_ variable _ get (1) -
class
_ variable _ set (1) -
class
_ variables (1) - clone (3)
- close (3)
-
close
_ on _ exec= (1) -
close
_ on _ exec? (1) -
close
_ read (1) -
close
_ write (1) - closed? (2)
- codepoints (4)
- coerce (3)
- collect (5)
- collect! (2)
-
collect
_ concat (1) - combination (2)
- compact (1)
- compact! (1)
-
compare
_ by _ identity (1) -
compare
_ by _ identity? (1) - concat (4)
- conj (1)
- conjugate (1)
-
const
_ defined? (1) -
const
_ get (1) -
const
_ missing (1) -
const
_ set (1) - constants (1)
- convert (2)
- convpath (1)
- count (7)
- cover? (1)
- crypt (1)
- ctime (2)
- curry (4)
- cycle (4)
- default (2)
- default= (1)
-
default
_ proc (1) -
default
_ proc= (1) -
define
_ method (2) -
define
_ singleton _ method (2) -
defined
_ class (1) - delete (5)
- delete! (1)
-
delete
_ at (1) -
delete
_ if (4) - denominator (5)
-
deprecate
_ constant (1) - deq (2)
-
destination
_ encoding (3) -
destination
_ encoding _ name (2) - detect (2)
- dig (3)
- digits (2)
- directory? (1)
- disable (2)
- disasm (1)
- disassemble (1)
- display (1)
- div (2)
- divmod (3)
- downcase (2)
- downcase! (1)
- downto (2)
- drop (3)
-
drop
_ while (3) - dup (3)
- each (22)
-
each
_ byte (6) -
each
_ char (6) -
each
_ codepoint (2) -
each
_ cons (2) -
each
_ entry (2) -
each
_ index (2) -
each
_ key (2) -
each
_ line (12) -
each
_ pair (2) -
each
_ slice (2) -
each
_ value (2) -
each
_ with _ index (2) -
each
_ with _ object (2) - empty? (1)
- enable (2)
- enabled? (1)
- enclosed? (1)
- encode (3)
- encode! (2)
- encoding (3)
- end (2)
-
end
_ with? (1) - enq (1)
- entries (1)
-
enum
_ for (2) - eof (2)
- eof? (2)
- eql? (13)
- equal? (4)
-
error
_ bytes (1) - eval (1)
- event (1)
- exception (2)
- exit (1)
- extend (1)
-
extend
_ object (1) - extended (1)
-
external
_ encoding (1) - fcntl (1)
- fdatasync (1)
- fdiv (4)
- feed (1)
- fetch (6)
-
fetch
_ values (2) - fileno (3)
- fill (6)
- find (2)
-
find
_ all (3) -
find
_ index (6) - finish (1)
- finite? (2)
- first (6)
-
flat
_ map (1) - flatten (2)
- flatten! (1)
- flock (1)
- floor (4)
- flush (1)
-
force
_ encoding (1) - freeze (2)
- frozen? (1)
- fsync (1)
-
garbage
_ collect (1) - gcd (1)
- gcdlcm (1)
- getbyte (2)
- getc (2)
- getlocal (2)
- gets (6)
- grep (3)
-
grep
_ v (3) - gsub (4)
- gsub! (4)
-
has
_ key? (1) -
has
_ value? (1) - hash (4)
- hex (1)
- id2name (1)
- imag (2)
- imaginary (2)
- include (1)
- include? (6)
- included (1)
-
included
_ modules (1) - index (5)
- infinite? (2)
- inherited (1)
- initialize (1)
-
initialize
_ copy (1) - inject (3)
-
inplace
_ mode (1) -
inplace
_ mode= (1) - insert (2)
-
insert
_ output (1) - inspect (13)
-
instance
_ eval (2) -
instance
_ exec (1) -
instance
_ method (1) -
instance
_ methods (1) -
instance
_ of? (1) -
instance
_ variable _ defined? (1) -
instance
_ variable _ get (1) -
instance
_ variable _ set (1) -
instance
_ variables (1) - integer? (1)
- intern (1)
-
internal
_ encoding (1) - invert (1)
- ioctl (1)
- irb (1)
-
is
_ a? (1) - isatty (1)
- join (3)
-
keep
_ if (4) - key (1)
- key? (2)
- keys (1)
- kill (1)
-
kind
_ of? (1) - label (2)
- last (4)
- lazy (1)
- lcm (1)
- length (2)
- lineno (3)
- lineno= (2)
- lines (14)
- ljust (1)
-
local
_ variable _ defined? (1) -
local
_ variable _ get (1) -
local
_ variable _ set (1) - localtime (2)
- lock (1)
- lstat (1)
- lstrip (1)
- magnitude (1)
- map (5)
- map! (2)
-
marshal
_ dump (1) -
marshal
_ load (2) - match (5)
- match? (3)
- max (12)
- max= (1)
-
max
_ by (4) - member? (3)
- merge (2)
- merge! (2)
- method (1)
-
method
_ added (1) -
method
_ defined? (1) -
method
_ id (1) -
method
_ missing (1) -
method
_ removed (1) -
method
_ undefined (1) - methods (1)
- min (12)
-
min
_ by (4) - minmax (2)
-
minmax
_ by (2) -
module
_ eval (2) -
module
_ exec (1) -
module
_ function (1) - modulo (3)
- mtime (2)
- name (2)
- name= (1)
-
named
_ captures (1) - negative? (3)
- new (1)
- next (3)
- next! (1)
-
next
_ float (1) -
next
_ values (1) - nil? (1)
- nonzero? (1)
- numerator (5)
-
object
_ id (1) - oct (1)
- offset (2)
- ord (2)
-
original
_ name (2) - pack (2)
- parameters (3)
- partition (1)
- path (3)
- peek (1)
-
peek
_ values (1) -
pending
_ interrupt? (1) - permutation (2)
- phase (2)
- pid (1)
- polar (2)
- pop (4)
- pos (3)
- pos= (3)
- positive? (3)
-
post
_ match (1) - pow (2)
-
pre
_ match (1) - pred (1)
- prepend (3)
-
prepend
_ features (1) - prepended (1)
-
prev
_ float (1) -
primitive
_ convert (4) -
primitive
_ errinfo (1) - print (2)
- printf (2)
- priority (1)
- priority= (1)
- private (1)
-
private
_ class _ method (1) -
private
_ constant (1) -
private
_ instance _ methods (1) -
private
_ method _ defined? (1) -
private
_ methods (1) - product (2)
- protected (1)
-
protected
_ instance _ methods (1) -
protected
_ method _ defined? (1) -
protected
_ methods (1) - public (1)
-
public
_ class _ method (1) -
public
_ constant (1) -
public
_ instance _ method (1) -
public
_ instance _ methods (1) -
public
_ method (1) -
public
_ method _ defined? (1) -
public
_ methods (1) -
public
_ send (2) - push (2)
- putback (2)
- putc (2)
- puts (2)
- quo (3)
- raise (1)
-
raised
_ exception (1) - rand (3)
- rassoc (2)
- rationalize (9)
- read (3)
-
read
_ nonblock (2) -
readagain
_ bytes (1) - readbyte (2)
- readchar (2)
- readline (6)
- readlines (6)
- readpartial (2)
- real (1)
- real? (2)
- rect (2)
- rectangular (2)
- reduce (3)
- refine (1)
- rehash (1)
- reject (7)
- reject! (4)
- remainder (2)
-
remove
_ class _ variable (1) -
remove
_ const (1) -
remove
_ instance _ variable (1) -
remove
_ method (1) - reopen (3)
-
repeated
_ combination (2) -
repeated
_ permutation (2) - replace (2)
- replacement (1)
- replacement= (1)
-
report
_ on _ exception (1) -
report
_ on _ exception= (1) -
respond
_ to? (1) -
respond
_ to _ missing? (1) - resume (1)
-
return
_ value (1) -
reverse
_ each (2) - rewind (3)
- rindex (4)
- rjust (1)
- rotate (1)
- rotate! (1)
- round (6)
- rpartition (1)
- rstrip (1)
- rstrip! (1)
- run (1)
- sample (4)
- scan (2)
- scrub (3)
- scrub! (3)
- seek (3)
- select (9)
- select! (4)
- self (1)
- send (2)
-
set
_ backtrace (1) -
set
_ encoding (6) -
set
_ trace _ func (1) - setbyte (1)
- shift (5)
- shuffle (2)
- shuffle! (2)
- signal (1)
-
singleton
_ class (1) -
singleton
_ method (1) -
singleton
_ method _ added (1) -
singleton
_ method _ removed (1) -
singleton
_ method _ undefined (1) -
singleton
_ methods (1) - size (5)
- sleep (1)
- slice (14)
- slice! (3)
-
slice
_ after (4) -
slice
_ before (5) -
slice
_ when (2) - sort (4)
- sort! (2)
-
sort
_ by (2) -
sort
_ by! (2) -
source
_ encoding (3) -
source
_ encoding _ name (2) -
source
_ location (3) - split (1)
- squeeze (1)
- squeeze! (1)
-
start
_ with? (1) - stat (1)
- status (1)
- step (8)
- stop? (1)
- store (1)
- strftime (1)
- strip (1)
- strip! (1)
- sub (3)
- sub! (3)
- succ (2)
- succ! (1)
- sum (5)
-
super
_ method (2) - swapcase (2)
- swapcase! (1)
- symlink? (1)
- sync (1)
- sync= (1)
- synchronize (1)
- sysread (1)
- sysseek (1)
- syswrite (1)
- taint (1)
- tainted? (1)
- take (3)
-
take
_ while (6) - tell (3)
- terminate (1)
-
thread
_ variable? (1) -
thread
_ variable _ get (1) -
thread
_ variable _ set (1) - times (2)
-
to
_ a (8) -
to
_ ary (2) -
to
_ binary (1) -
to
_ c (1) -
to
_ enum (2) -
to
_ f (3) -
to
_ h (1) -
to
_ hash (1) -
to
_ i (6) -
to
_ int (1) -
to
_ io (1) -
to
_ proc (1) -
to
_ r (3) -
to
_ s (11) -
to
_ str (1) -
to
_ sym (1) - tr (1)
- tr! (1)
-
tr
_ s (1) -
tr
_ s! (1) -
transform
_ values (2) -
transform
_ values! (2) - truncate (5)
- trust (1)
- tty? (1)
-
undef
_ method (1) - ungetbyte (1)
- ungetc (1)
-
unicode
_ normalize (1) -
unicode
_ normalize! (1) -
unicode
_ normalized? (1) - uniq (2)
- unlock (1)
- unpack (1)
- unpack1 (1)
- unshift (1)
- untaint (1)
- untrust (1)
- untrusted? (1)
- upcase (2)
- upcase! (1)
- update (2)
- upto (3)
- using (1)
- value? (1)
- values (1)
-
values
_ at (4) - wait (1)
- wakeup (1)
- warn (1)
-
with
_ object (2) - write (2)
-
write
_ nonblock (1) - yield (1)
- zero? (1)
- zip (6)
- | (5)
検索結果
先頭5件
-
Time
# <=>(other) -> -1 | 0 | 1 | nil (24022.0) -
self と other の時刻を比較します。self の方が大きい場合は 1 を、等しい場合は 0 を、 小さい場合は -1 を返します。比較できない場合は、nil を返します。
self と other の時刻を比較します。self の方が大きい場合は 1 を、等しい場合は 0 を、
小さい場合は -1 を返します。比較できない場合は、nil を返します。
@param other 自身と比較したい時刻を Time オブジェクトで指定します。
//emlist[][ruby]{
p t = Time.local(2000) # => 2000-01-01 00:00:00 +0900
p t2 = t + 2592000 # => 2000-01-31 00:00:00 +0900
p t <=> t2 # => -1
p ... -
Time
# eql?(other) -> bool (24022.0) -
other が Time かそのサブクラスのインスタンスであり自身と時刻が等しい場合に true を返します。そうでない場合に false を返します。
other が Time かそのサブクラスのインスタンスであり自身と時刻が等しい場合に
true を返します。そうでない場合に false を返します。
@param other 自身と比較したい時刻を Time オブジェクトを指定します。
//emlist[][ruby]{
p Time.local(2000, 1, 1).eql?(Time.local(2000, 1, 1)) # => true
p Time.local(2000, 1, 1).eql?(Time.local(2000, 1, 2)) # => false
//} -
Time
# getlocal -> Time (24022.0) -
タイムゾーンを地方時に設定した Time オブジェクトを新しく生成 して返します。
タイムゾーンを地方時に設定した Time オブジェクトを新しく生成
して返します。
@param utc_offset タイムゾーンを地方時に設定する代わりに協定世界時との
時差を、秒を単位とする整数か、"+HH:MM" "-HH:MM" 形式
の文字列で指定します。
//emlist[][ruby]{
p t = Time.utc(2000,1,1,20,15,1) # => 2000-01-01 20:15:01 UTC
p t.utc? # => true
p... -
Time
# getlocal(utc _ offset) -> Time (24022.0) -
タイムゾーンを地方時に設定した Time オブジェクトを新しく生成 して返します。
タイムゾーンを地方時に設定した Time オブジェクトを新しく生成
して返します。
@param utc_offset タイムゾーンを地方時に設定する代わりに協定世界時との
時差を、秒を単位とする整数か、"+HH:MM" "-HH:MM" 形式
の文字列で指定します。
//emlist[][ruby]{
p t = Time.utc(2000,1,1,20,15,1) # => 2000-01-01 20:15:01 UTC
p t.utc? # => true
p... -
Time
# localtime -> self (24022.0) -
タイムゾーンを地方時に設定します。
タイムゾーンを地方時に設定します。
このメソッドを呼び出した後は時刻変換を協定地方時として行ないます。
@param utc_offset タイムゾーンを地方時に設定する代わりに協定世界時との
時差を、秒を単位とする整数か、"+HH:MM" "-HH:MM" 形式
の文字列で指定します。
Time#localtime, Time#gmtime の挙動はシステムの
localtime(3) の挙動に依存します。Time クラ
スでは時刻を起算時からの経過秒数として保持していますが、ある特定の
時刻までの経過秒は、シス... -
Time
# localtime(utc _ offset) -> self (24022.0) -
タイムゾーンを地方時に設定します。
タイムゾーンを地方時に設定します。
このメソッドを呼び出した後は時刻変換を協定地方時として行ないます。
@param utc_offset タイムゾーンを地方時に設定する代わりに協定世界時との
時差を、秒を単位とする整数か、"+HH:MM" "-HH:MM" 形式
の文字列で指定します。
Time#localtime, Time#gmtime の挙動はシステムの
localtime(3) の挙動に依存します。Time クラ
スでは時刻を起算時からの経過秒数として保持していますが、ある特定の
時刻までの経過秒は、シス... -
Time
# round(ndigits=0) -> Time (24022.0) -
十進小数点数で指定した桁数の精度で丸めをし、 その Time オブジェクトを返します。 (デフォルトは0、つまり小数点の所で丸めます)。
十進小数点数で指定した桁数の精度で丸めをし、
その Time オブジェクトを返します。
(デフォルトは0、つまり小数点の所で丸めます)。
ndigits には 0 以上の整数を渡します。
@param ndigits 十進での精度(桁数)
//emlist[][ruby]{
require 'time'
t = Time.utc(1999,12,31, 23,59,59)
p((t + 0.4).round.iso8601(3)) # => "1999-12-31T23:59:59.000Z"
p((t + 0.49).round.iso8601(3)) # => "199... -
Time
# strftime(format) -> String (24022.0) -
時刻を format 文字列に従って文字列に変換した結果を返します。
時刻を format 文字列に従って文字列に変換した結果を返します。
@param format フォーマット文字列を指定します。使用できるものは 以下の通りです。
* %A: 曜日の名称(Sunday, Monday ... )
* %a: 曜日の省略名(Sun, Mon ... )
* %B: 月の名称(January, February ... )
* %b: 月の省略名(Jan, Feb ... )
* %C: 世紀 (2009年であれば 20)
* %c: 日付と時刻 (%a %b %e %T %Y)
* %D: 日付 (%m/%d/%y)
* ... -
TracePoint
# defined _ class -> Class | module (24022.0) -
メソッドを定義したクラスかモジュールを返します。
メソッドを定義したクラスかモジュールを返します。
//emlist[例][ruby]{
class C; def foo; end; end
trace = TracePoint.new(:call) do |tp|
p tp.defined_class # => C
end.enable do
C.new.foo
end
//}
メソッドがモジュールで定義されていた場合も(include に関係なく)モジュー
ルを返します。
//emlist[例][ruby]{
module M; def foo; end; end
class C; include M; end;
trac... -
TracePoint
# disable -> bool (24022.0) -
self のトレースを無効にします。
self のトレースを無効にします。
実行前の TracePoint#enabled? を返します。(トレースが既に有効であっ
た場合は true を返します。そうでなければ false を返します)
//emlist[例][ruby]{
trace.enabled? # => true
trace.disable # => false (実行前の状態)
trace.enabled? # => false
trace.disable # => false
//}
ブロックが与えられた場合、ブロック内でのみトレースが無効になります。
この場合はブロックの評価結果を返します。
//e... -
TracePoint
# disable { . . . } -> object (24022.0) -
self のトレースを無効にします。
self のトレースを無効にします。
実行前の TracePoint#enabled? を返します。(トレースが既に有効であっ
た場合は true を返します。そうでなければ false を返します)
//emlist[例][ruby]{
trace.enabled? # => true
trace.disable # => false (実行前の状態)
trace.enabled? # => false
trace.disable # => false
//}
ブロックが与えられた場合、ブロック内でのみトレースが無効になります。
この場合はブロックの評価結果を返します。
//e... -
TracePoint
# enable -> bool (24022.0) -
self のトレースを有効にします。
self のトレースを有効にします。
実行前の TracePoint#enabled? を返します。(トレースが既に有効であっ
た場合は true を返します。そうでなければ false を返します)
//emlist[例][ruby]{
trace.enabled? # => false
trace.enable # => false (実行前の状態)
# トレースが有効
trace.enabled? # => true
trace.enable # => true (実行前の状態)
# 引き続きトレースが有効
//}
ブロックが与えられた場合、ブロック内でのみ... -
TracePoint
# enable { . . . } -> object (24022.0) -
self のトレースを有効にします。
self のトレースを有効にします。
実行前の TracePoint#enabled? を返します。(トレースが既に有効であっ
た場合は true を返します。そうでなければ false を返します)
//emlist[例][ruby]{
trace.enabled? # => false
trace.enable # => false (実行前の状態)
# トレースが有効
trace.enabled? # => true
trace.enable # => true (実行前の状態)
# 引き続きトレースが有効
//}
ブロックが与えられた場合、ブロック内でのみ... -
TracePoint
# enabled? -> bool (24022.0) -
self のトレースが有効な場合に true を、そうでない場合に false を返しま す。
self のトレースが有効な場合に true を、そうでない場合に false を返しま
す。
@see TracePoint#enable, TracePoint#disable -
TracePoint
# event -> Symbol (24022.0) -
発生したイベントの種類を Symbol で返します。
発生したイベントの種類を Symbol で返します。
発生するイベントの詳細については、TracePoint.new を参照してくださ
い。
@raise RuntimeError イベントフックの外側で実行した場合に発生します。
//emlist[例][ruby]{
def foo(ret)
ret
end
trace = TracePoint.new(:call, :return) do |tp|
p tp.event
end
trace.enable
foo 1
# => :call
# :return
//} -
TracePoint
# lineno -> Integer (24022.0) -
発生したイベントの行番号を返します。
発生したイベントの行番号を返します。
@raise RuntimeError イベントフックの外側で実行した場合に発生します。
//emlist[例][ruby]{
def foo(ret)
ret
end
trace = TracePoint.new(:call, :return) do |tp|
tp.lineno
end
trace.enable
foo 1
# => 1
# 3
//} -
TracePoint
# path -> String (24022.0) -
イベントが発生したファイルのパスを返します。
イベントが発生したファイルのパスを返します。
@raise RuntimeError イベントフックの外側で実行した場合に発生します。
//emlist[例][ruby]{
def foo(ret)
ret
end
trace = TracePoint.new(:call) do |tp|
p tp.path # => "/path/to/test.rb"
end
trace.enable
foo 1
//} -
TracePoint
# raised _ exception -> Exception (24022.0) -
発生した例外を返します。
発生した例外を返します。
@raise RuntimeError :raise イベントのためのイベントフックの外側で実行し
た場合に発生します。
//emlist[例][ruby]{
trace = TracePoint.new(:raise) do |tp|
tp.raised_exception # => #<ZeroDivisionError: divided by 0>
end
trace.enable
begin
0/0
rescue
end
//} -
TracePoint
# return _ value -> object (24022.0) -
メソッドやブロックの戻り値を返します。
メソッドやブロックの戻り値を返します。
@raise RuntimeError :return、:c_return、:b_return イベントのためのイベ
ントフックの外側で実行した場合に発生します。
//emlist[例][ruby]{
def foo(ret)
ret
end
trace = TracePoint.new(:return) do |tp|
p tp.return_value # => 1
end
trace.enable
foo 1
//} -
TracePoint
# self -> object (24022.0) -
イベントを発生させたオブジェクトを返します。
イベントを発生させたオブジェクトを返します。
以下のようにする事で同じ値を取得できます。
//emlist[例][ruby]{
trace.binding.eval('self')
//}
@see TracePoint#binding -
TrueClass
# &(other) -> bool (24022.0) -
other が真なら true を, 偽なら false を返します。
other が真なら true を, 偽なら false を返します。
@param other 論理積を行なう式です。
& は再定義可能な演算子に分類されていますので、通常は true & other のように使われます。
//emlist[例][ruby]{
p true & true #=> true
p true & false #=> false
p true & nil #=> false
p true & (1 == 1) #=> true
p true & (1 + 1) #=> true
p true.&(true) #=> true... -
TrueClass
# ^(other) -> bool (24022.0) -
other が真なら false を, 偽なら true を返します。
other が真なら false を, 偽なら true を返します。
@param other 排他的論理和を行なう式です。
^ は再定義可能な演算子に分類されていますので、通常は true ^ other のように使われます。
//emlist[例][ruby]{
p true ^ true #=> false
p true ^ false #=> true
p true ^ nil #=> true
p true ^ (1 == 1) #=> false
p true ^ (1 + 1) #=> false
p true.^(true) #=> ... -
TrueClass
# |(other) -> bool (24022.0) -
常に true を返します。
常に true を返します。
@param other 論理和を行なう式です。
| は再定義可能な演算子に分類されていますので、通常は true | other のように使われます。
//emlist[例][ruby]{
p true | true #=> true
p true | false #=> true
p true | nil #=> true
p true | (1 == 1) #=> true
p true | (1 + 1) #=> true
p true.|(true) #=> true
p true.|(false) #=> ... -
UnboundMethod
# ==(other) -> bool (24022.0) -
自身と other が同じクラスあるいは同じモジュールの同じメソッドを表す場合に true を返します。そうでない場合に false を返します。
自身と other が同じクラスあるいは同じモジュールの同じメソッドを表す場合に
true を返します。そうでない場合に false を返します。
@param other 自身と比較したいオブジェクトを指定します。
//emlist[例][ruby]{
a = String.instance_method(:size)
b = String.instance_method(:size)
p a == b #=> true
c = Array.instance_method(:size)
p a == c ... -
UnboundMethod
# eql?(other) -> bool (24022.0) -
自身と other が同じクラスあるいは同じモジュールの同じメソッドを表す場合に true を返します。そうでない場合に false を返します。
自身と other が同じクラスあるいは同じモジュールの同じメソッドを表す場合に
true を返します。そうでない場合に false を返します。
@param other 自身と比較したいオブジェクトを指定します。
//emlist[例][ruby]{
a = String.instance_method(:size)
b = String.instance_method(:size)
p a == b #=> true
c = Array.instance_method(:size)
p a == c ... -
UnboundMethod
# inspect -> String (24022.0) -
self を読みやすい文字列として返します。
self を読みやすい文字列として返します。
詳しくは Method#inspect を参照してください。
//emlist[例][ruby]{
String.instance_method(:count).inspect # => "#<UnboundMethod: String#count>"
//}
@see Method#inspect -
UnboundMethod
# original _ name -> Symbol (24022.0) -
オリジナルのメソッド名を返します。
オリジナルのメソッド名を返します。
//emlist[例][ruby]{
class C
def foo; end
alias bar foo
end
C.instance_method(:bar).original_name # => :foo
//}
@see Method#original_name -
UnboundMethod
# parameters -> [object] (24022.0) -
UnboundMethod オブジェクトの引数の情報を返します。
UnboundMethod オブジェクトの引数の情報を返します。
詳しくは Method#parameters を参照してください。
@see Proc#parameters, Method#parameters -
UnboundMethod
# source _ location -> [String , Integer] | nil (24022.0) -
ソースコードのファイル名と行番号を配列で返します。
...nil を返します。
//emlist[例][ruby]{
require 'time'
Time.instance_method(:zone).source_location # => nil
Time.instance_method(:httpdate).source_location # => ["/Users/user/.rbenv/versions/2.4.3/lib/ruby/2.4.0/time.rb", 654]
//}
@see Proc#source_location, Method#source_location... -
UnboundMethod
# super _ method -> UnboundMethod | nil (24022.0) -
self 内で super を実行した際に実行されるメソッドを UnboundMethod オブジェ クトにして返します。
self 内で super を実行した際に実行されるメソッドを UnboundMethod オブジェ
クトにして返します。
@see Method#super_method -
UnboundMethod
# to _ s -> String (24022.0) -
self を読みやすい文字列として返します。
self を読みやすい文字列として返します。
詳しくは Method#inspect を参照してください。
//emlist[例][ruby]{
String.instance_method(:count).inspect # => "#<UnboundMethod: String#count>"
//}
@see Method#inspect