2696件ヒット
[2601-2696件を表示]
(0.073秒)
クラス
-
ARGF
. class (75) - Array (48)
- BasicObject (24)
- Binding (12)
- Complex (24)
- Exception (24)
- File (36)
- IO (468)
- LoadError (12)
- Module (144)
- Object (156)
- Proc (19)
- String (60)
- SystemExit (12)
- Thread (72)
- TracePoint (12)
- UncaughtThrowError (22)
キーワード
-
$ ! (12) -
$ & (12) -
$ & # 39; (12) -
$ -F (12) -
$ -I (6) -
$ -p (12) -
$ 1 (12) -
$ 10 (12) -
$ 11 (12) -
$ 2 (12) -
$ 3 (12) -
$ 4 (12) -
$ 5 (12) -
$ 6 (12) -
$ 7 (12) -
$ 8 (12) -
$ 9 (12) -
$ : (6) -
$ ; (12) -
$ > (12) -
$ ? (12) -
$ LOAD _ PATH (12) -
$ PROGRAM _ NAME (12) -
$ ` (12) -
$ stdin (12) -
$ stdout (12) -
$ ~ (12) - % (12)
- ARGF (12)
- Array (12)
- Complex (36)
- DATA (12)
- Float (12)
- Integer (12)
- Proc (12)
- Rational (7)
-
SCRIPT
_ LINES _ _ (12) - String (12)
- TracePoint (12)
-
_ _ callee _ _ (12) -
_ _ method _ _ (12) - abort (24)
-
add
_ trace _ func (12) - ancestors (12)
-
at
_ exit (12) - autoload (24)
- autoload? (12)
- binding (12)
- binread (12)
- binwrite (12)
- caller (36)
-
caller
_ locations (24) - catch (24)
- chomp (12)
- chop (12)
- class (12)
-
class
_ eval (24) -
const
_ defined? (12) - constants (24)
-
defined
_ class (12) - eval (36)
- exception (24)
- exec (48)
- exit (24)
- exit! (12)
- fail (36)
-
for
_ fd (12) - foreach (24)
- fork (24)
- format (12)
- freeze (12)
- gets (39)
-
global
_ variables (12) - gsub (36)
- hex (12)
- identical? (12)
- include (12)
- inspect (12)
-
instance
_ eval (24) -
instance
_ variables (12) - kill (24)
- lambda (18)
- load (12)
-
local
_ variables (12) - loop (24)
- method (12)
-
module
_ eval (24) - new (43)
- oct (12)
- open (72)
- p (12)
- path (12)
- popen (168)
- pp (8)
- print (36)
- printf (48)
- proc (19)
-
public
_ instance _ method (12) - putc (36)
- puts (36)
- raise (48)
- read (36)
- readline (12)
- readlines (48)
- rect (12)
- rectangular (12)
-
remove
_ const (12) - reopen (36)
-
require
_ relative (12) - sample (48)
- select (24)
- send (24)
-
set
_ trace _ func (24) - sleep (24)
- spawn (60)
- sprintf (12)
- srand (24)
- status (12)
- sub (24)
- sysopen (12)
- system (48)
- tag (11)
- terminate (12)
- test (24)
-
to
_ a (12) -
to
_ ary (12) -
to
_ f (12) -
to
_ i (12) -
to
_ int (12) -
to
_ str (12) -
trace
_ var (36) - trap (24)
-
untrace
_ var (12) - value (11)
- warn (8)
- write (24)
検索結果
先頭5件
-
Module
. constants -> [Symbol] (20.0) -
このメソッドを呼び出した時点で参照可能な定数名の配列を返します。
...します。
//emlist[例][ruby]{
class C
FOO = 1
end
p Module.constants # => [:RUBY_PLATFORM, :STDIN, ..., :C, ...]
# 出力中に :FOO は現われない
//}
@see Module#constants, Kernel.#local_variables, Kernel.#global_variables, Object#instance_variables, Module#class... -
Object
# instance _ variables -> [Symbol] (20.0) -
オブジェクトのインスタンス変数名をシンボルの配列として返します。
...列として返します。
//emlist[][ruby]{
obj = Object.new
obj.instance_eval { @foo, @bar = nil }
p obj.instance_variables
#=> [:@foo, :@bar]
//}
@see Object#instance_variable_get, Kernel.#local_variables, Kernel.#global_variables, Module.constants, Module#constants, Module#class_variables... -
Object
# method(name) -> Method (20.0) -
オブジェクトのメソッド name をオブジェクト化した Method オブジェクトを返します。
...トを返します。
@param name メソッド名をSymbol またはStringで指定します。
@raise NameError 定義されていないメソッド名を引数として与えると発生します。
//emlist[][ruby]{
me = -365.method(:abs)
p me #=> #<Method: Integer#abs>
p me.call #=> 365
//}
@......see Module#instance_method, Method, BasicObject#__send__, Object#send, Kernel.#eval, Object#singleton_method... -
Object
:: DATA -> File (20.0) -
スクリプトの __END__ プログラムの終り以降をアクセスする File オブジェクト。
...スクリプトの __END__
プログラムの終り以降をアクセスする File オブジェクト。
d:spec/program#terminateも参照。
ソースファイルの __END__ 以降は解析・実行の対象にならないので
その部分にプログラムが利用するためのデータを......。
* Kernel.#require や Kernel.#load で
読み込まれたファイルの中であってもそのファイル (__FILE__, d:spec/variables#pseudo)
ではなく実行されたファイル ($0) を指します。
=== 例1
print DATA.gets # => 故人西辞黄鶴楼
print DATA.......gets # => 烟花三月下揚州
print DATA.gets # => 孤帆遠影碧空尽
print DATA.gets # => 唯見長江天際流
DATA.gets # => nil
__END__
故人西辞黄鶴楼
烟花三月下揚州
孤帆遠影碧空尽
唯見長江天際流
=== 例2
sum = 0... -
SystemExit
# status -> Integer (20.0) -
例外オブジェクトに保存された終了ステータスを返します。
...します。
終了ステータスは Kernel.#exit や SystemExit.new などで設定されます。
例:
begin
exit 1
rescue SystemExit => err
p err.status # => 1
end
begin
raise SystemExit.new(1, "dummy exit")
rescue SystemExit => err
p err.status # => 1
end... -
Object
# to _ ary -> Array (14.0) -
オブジェクトの Array への暗黙の変換が必要なときに内部で呼ばれます。 デフォルトでは定義されていません。
...すべての場面で代置可能であるような、
* 配列そのものとみなせるようなもの
という厳しいものになっています。
//emlist[][ruby]{
class Foo
def to_ary
[3,4]
end
end
it = Foo.new
p([1,2] + it) #=> [1, 2, 3, 4]
//}
@see Object#to_a,Kernel.#Array... -
Object
# to _ int -> Integer (14.0) -
オブジェクトの Integer への暗黙の変換が必要なときに内部で呼ばれます。 デフォルトでは定義されていません。
...が使われるすべての場面で代置可能であるような、
* 整数そのものとみなせるようなもの
という厳しいものになっています。
//emlist[][ruby]{
class Foo
def to_int
1
end
end
ary = [:a, :b, :c]
p(ary[Foo.new]) # => :b
//}
@see Kernel.#Integer... -
Object
# to _ str -> String (14.0) -
オブジェクトの String への暗黙の変換が必要なときに内部で呼ばれます。 デフォルトでは定義されていません。
...面で代置可能であるような、
* 文字列そのものとみなせるようなもの
という厳しいものになっています。
//emlist[][ruby]{
class Foo
def to_str
'Edition'
end
end
it = Foo.new
p('Second' + it) #=> "SecondEdition"
//}
@see Object#to_s,Kernel.#String...