クラス
-
ARGF
. class (110) - BasicObject (36)
- Exception (12)
- IO (12)
- Module (216)
-
Net
:: HTTPResponse (12) - Object (72)
- OptionParser (168)
-
Resolv
:: DNS (12) - TracePoint (24)
- UnboundMethod (12)
モジュール
- Enumerable (96)
- Exception2MessageMapper (24)
- TSort (35)
キーワード
- < (12)
- == (12)
- Fail (6)
- accept (12)
- bind (12)
-
callee
_ id (12) -
class
_ variable _ get (12) - close (2)
-
const
_ get (12) -
const
_ missing (12) -
define
_ method (24) - eof (12)
- eof? (12)
- fail (6)
- fileno (12)
- getresource (12)
- include (12)
-
initialize
_ copy (12) -
instance
_ eval (24) -
instance
_ method (12) - max (48)
-
method
_ id (12) -
method
_ missing (12) - min (48)
- on (144)
- private (48)
-
private
_ constant (12) -
public
_ constant (12) -
public
_ method (12) - readbyte (24)
- readchar (12)
- readline (36)
- reject (12)
-
remove
_ class _ variable (12) -
remove
_ const (12) -
remove
_ instance _ variable (12) -
remove
_ method (12) -
respond
_ to? (12) -
singleton
_ class (12) -
singleton
_ method (12) -
to
_ i (12) - tsort (12)
-
tsort
_ each (23) -
undef
_ method (12) - value (12)
検索結果
先頭5件
-
Exception2MessageMapper
# Raise(exception _ class = nil , *rest) -> () (15246.0) -
登録されている情報を使用して、例外を発生させます。
...。
@param exception_class 例外クラス。
@param rest メッセージに埋め込む値。
@raise Exception2MessageMapper::ErrNotRegisteredException 指定された例外クラスに対応するメッセージが存在しない場合に発生します。
例:
class Foo
extend Exceptio......ceptionClass, "message...%d, %d and %d" # =>
def foo
Raise NewExceptionClass, 1, 2, 3
end
end
Foo.new().foo() #=> in `Raise': message...1, 2 and 3 (Foo::NewExceptionClass)
# という例外が発生します。
Foo.Raise Foo::NewExceptionClass, 1, 3......, 5 #=> in `Raise': message...1, 3 and 5 (Foo::NewExceptionClass)
# という例外が発生します。... -
Object
# singleton _ class -> Class (6245.0) -
レシーバの特異クラスを返します。 まだ特異クラスがなければ、新しく作成します。
...れ NilClass, TrueClass,
FalseClass を返します。
@raise TypeError レシーバが Integer、Float、Symbol の場合に発生します。
//emlist[][ruby]{
Object.new.singleton_class #=> #<Class:#<Object:0xb7ce1e24>>
String.singleton_class #=> #<Class:String>
nil.singleton_class......#=> NilClass
//}
@see Object#class... -
Module
# remove _ class _ variable(name) -> object (6126.0) -
引数で指定したクラス変数を取り除き、そのクラス変数に設定さ れていた値を返します。
...します。
@raise NameError 引数で指定されたクラス変数がそのモジュールやクラスに定義されていない場合に発生します。
//emlist[例][ruby]{
class Foo
@@foo = 1
remove_class_variable(:@@foo) # => 1
p @@foo # => uninitialized class variable @@foo in... -
Module
# class _ variable _ get(name) -> object (6120.0) -
クラス/モジュールに定義されているクラス変数 name の値を返します。
...の値を返します。
@param name String または Symbol を指定します。
@raise NameError クラス変数 name が定義されていない場合、発生します。
//emlist[例][ruby]{
class Fred
@@foo = 99
end
def Fred.foo
class_variable_get(:@@foo)
end
p Fred.foo #=> 99
//}... -
ARGF
. class # close -> self (3013.0) -
現在開いている処理対象のファイルをクローズします。開くファイルが残って いる場合は次のファイルをオープンします。 ただし、標準入力はクローズされません。
..."bar" > bar
$ ruby argf.rb foo bar
ARGF.filename # => "foo"
ARGF.close
ARGF.filename # => "bar"
ARGF.close
ARGF.close # => closed stream (IOError)
@raise IOError 処理対象のファイルが既にクローズされていた場合に発生します。
@see ARGF.class#closed?... -
ARGF
. class # readchar -> String (3013.0) -
ARGFから 1 文字読み込んで、その文字に対応する String を返します。EOF に 到達した時には EOFErrorを発生します。
...rorを発生します。
@raise EOFError EOFに達した時発生する
$ echo "foo" > file
$ ruby argf.rb file
ARGF.readchar # => "f"
ARGF.readchar # => "o"
ARGF.readchar # => "o"
ARGF.readchar # => "\n"
ARGF.readchar # => end of file reached (EOFError)
@see ARGF.class#getc... -
ARGF
. class # readline(limit) -> String (3013.0) -
ARGFの現在位置から一行ずつ文字列として読み込みます。EOF に到達した時に は EOFError を発生します。
...りなしとみなします。空文字列 "" を指定すると連続する改行を行
の区切りとみなします(パラグラフモード)。
@param limit 最大の読み込みバイト数
@raise EOFError EOFに達したら発生する
@see Kernel.#readline, ARGF.class#gets... -
ARGF
. class # readline(rs = $ / ) -> String (3013.0) -
ARGFの現在位置から一行ずつ文字列として読み込みます。EOF に到達した時に は EOFError を発生します。
...りなしとみなします。空文字列 "" を指定すると連続する改行を行
の区切りとみなします(パラグラフモード)。
@param limit 最大の読み込みバイト数
@raise EOFError EOFに達したら発生する
@see Kernel.#readline, ARGF.class#gets... -
ARGF
. class # readline(rs , limit) -> String (3013.0) -
ARGFの現在位置から一行ずつ文字列として読み込みます。EOF に到達した時に は EOFError を発生します。
...りなしとみなします。空文字列 "" を指定すると連続する改行を行
の区切りとみなします(パラグラフモード)。
@param limit 最大の読み込みバイト数
@raise EOFError EOFに達したら発生する
@see Kernel.#readline, ARGF.class#gets... -
ARGF
. class # eof -> bool (3007.0) -
現在開いているファイルがEOFに達したらtrueを返します。そうでない場合は falseを返します。
...現在開いているファイルがEOFに達したらtrueを返します。そうでない場合は
falseを返します。
@raise IOError ファイルがopenされていない場合に発生します。
$ echo "eof" | ruby argf.rb
ARGF.eof? # => false
3.times { ARGF.readc...