7474件ヒット
[1-100件を表示]
(0.120秒)
別のキーワード
種類
- インスタンスメソッド (7235)
- 特異メソッド (170)
- モジュール関数 (44)
- クラス (25)
クラス
-
ARGF
. class (246) - Array (703)
- BasicObject (77)
- Bignum (42)
- Binding (27)
- Class (11)
- Complex (49)
- Data (18)
- Dir (61)
- Enumerator (66)
-
Enumerator
:: ArithmeticSequence (12) -
Enumerator
:: Chain (12) -
Enumerator
:: Lazy (22) - Exception (44)
- Fiber (26)
- File (22)
-
File
:: Stat (11) - Fixnum (42)
- Float (137)
- FrozenError (5)
- Hash (442)
- IO (345)
- Integer (484)
- MatchData (99)
- Method (126)
- Module (338)
- Mutex (8)
- NameError (9)
- Numeric (261)
- Object (282)
- Proc (44)
-
Process
:: Status (33) - Random (33)
- Range (107)
- Rational (79)
- Refinement (3)
- Regexp (11)
-
RubyVM
:: AbstractSyntaxTree :: Node (42) -
RubyVM
:: InstructionSequence (110) - SignalException (22)
- String (1340)
- Struct (136)
- Symbol (273)
- SystemCallError (11)
- Thread (144)
-
Thread
:: Backtrace :: Location (66) -
Thread
:: ConditionVariable (27) -
Thread
:: Mutex (36) -
Thread
:: Queue (9) -
Thread
:: SizedQueue (9) - ThreadGroup (33)
- Time (183)
- TracePoint (88)
- UnboundMethod (53)
- UncaughtThrowError (10)
モジュール
- Comparable (24)
- Enumerable (315)
- ObjectSpace (33)
- Process (11)
- Warning (3)
キーワード
- ! (11)
- != (11)
- !~ (11)
- % (34)
- & (22)
- * (11)
- ** (11)
- + (22)
- +@ (9)
- - (11)
- -@ (45)
- < (45)
- << (28)
- <= (45)
- <=> (110)
- == (96)
- === (43)
- =~ (22)
- > (45)
- >= (45)
- >> (17)
- NoMethodError (11)
- Refinement (3)
- UnboundMethod (11)
- [] (159)
- []= (77)
-
_ dump (11) - abs (11)
-
absolute
_ path (22) - add (11)
-
alias
_ method (8) - allbits? (7)
- anybits? (7)
-
append
_ features (11) - autoload (11)
- b (11)
-
backtrace
_ locations (22) -
base
_ label (22) - between? (11)
- bind (11)
-
bind
_ call (10) -
bit
_ length (17) - broadcast (9)
- bsearch (22)
-
bsearch
_ index (18) - byterindex (2)
- bytes (50)
- bytesplice (4)
- call (22)
- capitalize (11)
- capitalize! (11)
- casecmp (11)
- casecmp? (8)
- cause (11)
- ceil (11)
- ceildiv (2)
- center (11)
- chars (36)
- children (12)
- chomp (11)
- chomp! (11)
- chop! (11)
- chr (33)
-
chunk
_ while (11) - clamp (13)
- class (11)
-
class
_ eval (22) -
class
_ exec (11) - clear (11)
-
clock
_ gettime (11) - close (18)
- codepoints (50)
- coerce (33)
- collect! (22)
- combination (22)
- compact (22)
- compact! (19)
-
compare
_ by _ identity (11) - concat (38)
- conjugate (11)
-
const
_ added (2) - count (11)
- crypt (11)
- curry (20)
- deconstruct (2)
-
deconstruct
_ keys (2) - dedup (2)
- default (22)
-
define
_ finalizer (22) -
define
_ singleton _ method (22) -
defined
_ class (11) - delete (11)
- delete! (11)
-
delete
_ if (44) -
delete
_ prefix! (7) -
delete
_ suffix! (7) -
deprecate
_ constant (9) - difference (6)
- dig (27)
- digits (22)
- disable (22)
- disasm (11)
- disassemble (11)
- display (11)
- div (11)
- divmod (39)
- downcase (8)
- downcase! (11)
- downto (22)
- each (254)
-
each
_ byte (66) -
each
_ char (44) -
each
_ child (12) -
each
_ codepoint (66) -
each
_ cons (6) -
each
_ entry (22) -
each
_ grapheme _ cluster (14) -
each
_ index (11) -
each
_ key (22) -
each
_ line (110) -
each
_ pair (44) -
each
_ slice (6) -
each
_ value (22) -
each
_ with _ index (22) - enable (22)
- enabled? (11)
- enclose (11)
- encode (33)
- encode! (22)
-
end
_ with? (16) - entries (6)
-
enum
_ for (22) - eql? (27)
- equal? (44)
- eval (22)
- exception (22)
- exit (11)
- extend (11)
-
extend
_ object (11) - extended (11)
- fdiv (50)
-
fetch
_ values (18) - fileno (10)
- fill (22)
- filter! (36)
- finite? (8)
-
first
_ column (6) -
first
_ lineno (17) - flatten (11)
- flatten! (11)
- floor (11)
-
force
_ encoding (11) - freeze (22)
- friday? (11)
- gcd (11)
- gcdlcm (11)
- getbyte (11)
- getc (11)
- gmt? (11)
- gmtime (11)
-
grapheme
_ clusters (14) - gsub! (44)
- hash (69)
- hex (11)
-
import
_ methods (3) - infinite? (8)
- inherited (11)
-
initialize
_ copy (11) - inject (33)
- insert (22)
- inspect (130)
-
instance
_ eval (22) -
instance
_ exec (11) -
instance
_ method (11) - intern (11)
- itself (11)
- join (22)
-
keep
_ if (56) - kill (11)
- label (22)
-
last
_ column (6) -
last
_ lineno (6) - lazy (11)
- lcm (11)
- length (22)
- lineno (11)
- lines (92)
- list (11)
- ljust (11)
- localtime (22)
- lock (11)
- lstrip! (11)
- magnitude (28)
- map! (22)
-
marshal
_ load (11) - match (33)
- match? (16)
-
max
_ by (44) - merge (22)
- merge! (32)
-
module
_ eval (22) -
module
_ exec (11) -
module
_ function (7) - modulo (11)
- monday? (11)
- name (9)
- name= (9)
- names (11)
- negative? (26)
- new (22)
- next (33)
- next! (11)
-
next
_ float (10) - nobits? (7)
- offset (22)
- ord (11)
- owned? (11)
- partition (11)
- path (33)
-
pending
_ interrupt? (11) - permutation (22)
- positive? (26)
- pow (22)
- pred (11)
-
prepend
_ features (11) -
prev
_ float (10) - printf (11)
- private (14)
-
private
_ class _ method (15) -
private
_ constant (11) - product (22)
- protected (7)
- public (4)
-
public
_ class _ method (15) -
public
_ constant (11) -
public
_ instance _ method (11) - putc (11)
- puts (11)
- quo (11)
- raise (15)
- rand (33)
- rationalize (11)
- receiver (24)
- rect (11)
- rectangular (11)
- reduce (33)
- reject (22)
- reject! (44)
- remainder (25)
-
remove
_ method (11) - reopen (22)
-
repeated
_ combination (22) -
repeated
_ permutation (22) - replace (33)
- resume (11)
- reverse! (11)
-
reverse
_ each (44) - rewind (17)
- rindex (11)
- rjust (11)
- rotate! (11)
- round (11)
- rpartition (11)
- rstrip! (11)
- run (11)
-
safe
_ level (5) - sample (22)
- saturday? (11)
- scan (22)
- scrub (33)
- scrub! (33)
- select! (66)
-
set
_ encoding (66) - shift (11)
- signal (9)
- signm (11)
- signo (11)
-
singleton
_ class? (11) -
singleton
_ methods (11) - size (33)
- slice (121)
-
slice
_ when (11) - sort (22)
- sort! (22)
-
sort
_ by (22) -
sort
_ by! (22) -
source
_ location (6) - split (12)
- squeeze! (11)
-
start
_ with? (16) - step (112)
- strip! (11)
- sub! (33)
- succ (40)
- succ! (11)
- sum (22)
- sunday? (11)
-
super
_ method (20) - swapcase (8)
- swapcase! (11)
- synchronize (11)
- taint (9)
- tally (8)
- tap (11)
- terminate (11)
- then (12)
- thursday? (11)
- times (22)
-
to
_ a (28) -
to
_ ary (11) -
to
_ c (22) -
to
_ enum (22) -
to
_ f (22) -
to
_ h (72) -
to
_ hash (11) -
to
_ i (11) -
to
_ int (22) -
to
_ io (11) -
to
_ path (11) -
to
_ proc (42) -
to
_ s (95) -
to
_ str (11) -
to
_ sym (11) - tr! (11)
-
tr
_ s! (11) -
transform
_ keys! (17) -
transform
_ values! (16) - truncate (11)
- trust (9)
- tuesday? (11)
- type (6)
- unbind (11)
-
undef
_ method (11) -
undefine
_ finalizer (11) - undump (7)
-
unicode
_ normalize (10) -
unicode
_ normalize! (10) -
unicode
_ normalized? (10) - union (6)
- uniq (22)
- uniq! (11)
- unlock (11)
- unshift (11)
- untaint (9)
- untrust (9)
- upcase (8)
- upcase! (11)
- update (44)
- upto (33)
- utc (11)
- utc? (11)
- value (11)
- wait (9)
- wakeup (11)
- warn (3)
- wednesday? (11)
- with (2)
-
yield
_ self (14) - zip (44)
- | (11)
- ~ (11)
検索結果
先頭5件
-
TracePoint
# self -> object (21215.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... -
Module
# protected(*name) -> self (12303.0) -
メソッドを protected に設定します。
...ッドを protected に設定します。
引数なしのときは今後このクラスまたはモジュール定義内で新規に定義さ
れるメソッドを protected に設定します。
引数が与えられた時には引数によって指定されたメソッドを protected
に設定......します。
可視性については d:spec/def#limit を参照して下さい。
@param name 0 個以上の String または Symbol を指定します。
@raise NameError 存在しないメソッド名を指定した場合に発生します。
@see Module#protected_method_defined?... -
Object
# itself -> object (12218.0) -
self を返します。
...
self を返します。
//emlist[][ruby]{
string = 'my string' # => "my string"
string.itself.object_id == string.object_id # => true
//}... -
Thread
# terminate -> self (9305.0) -
スレッドの実行を終了させます。終了時に ensure 節が実行されます。
...す。
ただし、スレッドは終了処理中(aborting)にはなりますが、
直ちに終了するとは限りません。すでに終了している場合は何もしません。このメソッドにより
終了したスレッドの Thread#value の返り値は不定です。
自身がメ......exit(0)
により終了します。
Kernel.#exit と違い例外 SystemExit を発生しません。
th1 = Thread.new do
begin
sleep 10
ensure
p "this will be displayed"
end
end
sleep 0.1
th1.kill
#=> "this will be displayed"
@see Kernel.#exit, Kernel.#exit!... -
Object
# yield _ self -> Enumerator (9256.0) -
self を引数としてブロックを評価し、ブロックの結果を返します。
...
self を引数としてブロックを評価し、ブロックの結果を返します。
//emlist[例][ruby]{
"my string".yield_self {|s| s.upcase } # => "MY STRING"
3.next.yield_self {|x| x**x }.to_s # => "256"
//}
値をメソッドチェインのパイプラインに次々と渡すの......です。
//emlist[メソッドチェインのパイプライン][ruby]{
require 'open-uri'
require 'json'
construct_url(arguments).
yield_self {|url| URI(url).read }.
yield_self {|response| JSON.parse(response) }
//}
ブロックなしで呼び出されたときは Enumerator を返します......。
例えば条件によって値を捨てるのに使えます。
//emlist[][ruby]{
# 条件にあうので何もしない
1.yield_self.detect(&:odd?) # => 1
# 条件に合わないので値を捨てる
2.yield_self.detect(&:odd?) # => nil
//}
@see Object#tap... -
Object
# yield _ self {|x| . . . } -> object (9256.0) -
self を引数としてブロックを評価し、ブロックの結果を返します。
...
self を引数としてブロックを評価し、ブロックの結果を返します。
//emlist[例][ruby]{
"my string".yield_self {|s| s.upcase } # => "MY STRING"
3.next.yield_self {|x| x**x }.to_s # => "256"
//}
値をメソッドチェインのパイプラインに次々と渡すの......です。
//emlist[メソッドチェインのパイプライン][ruby]{
require 'open-uri'
require 'json'
construct_url(arguments).
yield_self {|url| URI(url).read }.
yield_self {|response| JSON.parse(response) }
//}
ブロックなしで呼び出されたときは Enumerator を返します......。
例えば条件によって値を捨てるのに使えます。
//emlist[][ruby]{
# 条件にあうので何もしない
1.yield_self.detect(&:odd?) # => 1
# 条件に合わないので値を捨てる
2.yield_self.detect(&:odd?) # => nil
//}
@see Object#tap... -
Time
# localtime -> self (9240.0) -
タイムゾーンを地方時に設定します。
...am utc_offset タイムゾーンを地方時に設定する代わりに協定世界時との
時差を、秒を単位とする整数か、"+HH:MM" "-HH:MM" 形式
の文字列で指定します。
Time#localtime, Time#gmtime の挙動はシステムの
localtime(......存します。Time クラ
スでは時刻を起算時からの経過秒数として保持していますが、ある特定の
時刻までの経過秒は、システムがうるう秒を勘定するかどうかによって異
なる場合があります。システムを越えて Time オブジェ......。
//emlist[][ruby]{
p t = Time.utc(2000, "jan", 1, 20, 15, 1) # => 2000-01-01 20:15:01 UTC
p t.utc? # => true
p t.localtime # => 2000-01-02 05:15:01 +0900
p t.utc? # => false
p t.localtime("+09:00")... -
Time
# localtime(utc _ offset) -> self (9240.0) -
タイムゾーンを地方時に設定します。
...am utc_offset タイムゾーンを地方時に設定する代わりに協定世界時との
時差を、秒を単位とする整数か、"+HH:MM" "-HH:MM" 形式
の文字列で指定します。
Time#localtime, Time#gmtime の挙動はシステムの
localtime(......存します。Time クラ
スでは時刻を起算時からの経過秒数として保持していますが、ある特定の
時刻までの経過秒は、システムがうるう秒を勘定するかどうかによって異
なる場合があります。システムを越えて Time オブジェ......。
//emlist[][ruby]{
p t = Time.utc(2000, "jan", 1, 20, 15, 1) # => 2000-01-01 20:15:01 UTC
p t.utc? # => true
p t.localtime # => 2000-01-02 05:15:01 +0900
p t.utc? # => false
p t.localtime("+09:00")... -
Time
# gmtime -> self (9228.0) -
タイムゾーンを協定世界時に設定します。
...このメソッドを呼び出した後は時刻変換を協定世界時として行ないます。
Time#localtime, Time#gmtime の挙動はシステムの
localtime(3) の挙動に依存します。Time クラ
スでは時刻を起算時からの経過秒数として保持していますが、あ...... Time オブジェクトを受け
渡す場合には注意する必要があります。
//emlist[][ruby]{
p t = Time.local(2000,1,1,20,15,1) # => 2000-01-01 20:15:01 +0900
p t.gmt? # => false
p t.gmtime # => 2000-01-01 11:15:01 UTC
p t.gmt?......# => true
//}... -
Time
# utc -> self (9228.0) -
タイムゾーンを協定世界時に設定します。
...このメソッドを呼び出した後は時刻変換を協定世界時として行ないます。
Time#localtime, Time#gmtime の挙動はシステムの
localtime(3) の挙動に依存します。Time クラ
スでは時刻を起算時からの経過秒数として保持していますが、あ...... Time オブジェクトを受け
渡す場合には注意する必要があります。
//emlist[][ruby]{
p t = Time.local(2000,1,1,20,15,1) # => 2000-01-01 20:15:01 +0900
p t.gmt? # => false
p t.gmtime # => 2000-01-01 11:15:01 UTC
p t.gmt?......# => true
//}... -
String
# lstrip! -> self | nil (9225.0) -
文字列の先頭にある空白文字を全て破壊的に取り除きます。 空白文字の定義は " \t\r\n\f\v" です。
...義は " \t\r\n\f\v" です。
lstrip! は self を変更して返します。
ただし取り除く空白がなかったときは nil を返します。
//emlist[例][ruby]{
str = " abc"
p str.lstrip! # => "abc"
p str # => "abc"
str = "abc"
p str.lstrip! # => nil
p str #... -
String
# rstrip! -> self | nil (9225.0) -
文字列の末尾にある空白文字を全て破壊的に取り除きます。 空白文字の定義は " \t\r\n\f\v\0" です。
...的に取り除きます。
空白文字の定義は " \t\r\n\f\v\0" です。
//emlist[例][ruby]{
str = " abc\n"
p str.rstrip! # => " abc"
p str # => " abc"
str = " abc \r\n\t\v\0"
p str.rstrip! # => " abc"
p str # => " abc"
//}
@see String#rstrip, String#lstrip...