るりまサーチ

最速Rubyリファレンスマニュアル検索!
4277件ヒット [1-100件を表示] (0.215秒)
トップページ > クエリ:i[x] > クエリ:l[x] > クエリ:@[x] > クエリ:class[x]

別のキーワード

  1. _builtin to_i
  2. fiddle to_i
  3. matrix elements_to_i
  4. ipaddr to_i
  5. csv to_i

クラス

キーワード

検索結果

<< 1 2 3 ... > >>

Win32::Registry::PredefinedKey#class (30217.0)

@todo

...@todo...

Class#superclass -> Class | nil (24525.0)

自身のスーパークラスを返します。

...//emlist[例][ruby]{
File.superclass #=> IO
I
O.superclass #=> Object
class
Foo; end
class
Bar < Foo; end
Bar.superclass #=> Foo
Object.superclass #=> BasicObject
//}

ただし BasicObject.superclass は nil を返します。

//emlist[例][ruby]{
BasicObject....
...superclass #=> nil
//}

@
see Class#subclasses...

TracePoint#defined_class -> Class | module (21556.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;
trace = TracePoint.new(:call) do |tp|
p tp.defined_class # => M
end.enable do
C.new.foo
end
//}

[注意] 特異メソッドを実行した場合は TracePoint#defined_class は特異クラ
スを返します。また、Kernel.#set_trace_func の 6...
...く元のクラスを返します。

//emlist[例][ruby]{
class
C; def self.foo; end; end
trace = TracePoint.new(:call) do |tp|
p tp.defined_class # => #<Class:C>
end.enable do
C.foo
end
//}

Kernel.#set_trace_func と TracePoint の上記の差分に注意して
ください。

@
see 50864...

ARGF.class#internal_encoding -> Encoding | nil (21418.0)

ARGF から読み込んだ文字列の内部エンコーディングを返します。 内部エンコーディングが指定されていない場合は nil を返します。

...nil を返します。

まだ読み込み処理を始めていない場合は Encoding.default_external を返します。

ARGF.class#set_encoding で設定します。


例:
# $ ruby -Eutf-8 test.rb

# test.rb
ARGF.internal_encoding # => #<Encoding:UTF-8>
ARGF.set_encoding('u...
...tf-8','ascii')
ARGF.internal_encoding # => #<Encoding:US-ASCII>

例:
ARGF.binmode
ARGF.internal_encoding # => nil

@
see IO, ARGF.class#external_encoding...

Module#class_variables(inherit = true) -> [Symbol] (21343.0)

クラス/モジュールに定義されているクラス変数の名前の配列を返します。

...

@
param inherit false を指定しない場合はスーパークラスやインクルードして
いるモジュールのクラス変数を含みます。

//emlist[例][ruby]{
class
One
@
@var1 = 1
end
class
Two < One
@
@var2 = 2
end
One.class_variables # => [:@@var1]
Two.class_...
...variables # => [:@@var2, :@@var1]
Two.class_variables(false) # => [:@@var2]
//}

@
see Module.constants, Kernel.#local_variables, Kernel.#global_variables, Object#instance_variables, Module#constants...

絞り込み条件を変える

Module#remove_class_variable(name) -> object (21343.0)

引数で指定したクラス変数を取り除き、そのクラス変数に設定さ れていた値を返します。

...、そのクラス変数に設定さ
れていた値を返します。

@
param name String または Symbol を指定します。

@
return 引数で指定されたクラス変数に設定されていた値を返します。

@
raise NameError 引数で指定されたクラス変数がそのモジュ...
...ールやクラスに定義されていない場合に発生します。

//emlist[例][ruby]{
class
Foo
@
@foo = 1
remove_class_variable(:@@foo) # => 1
p @@foo # => uninitialized class variable @@foo in Foo (NameError)
end
//}

@
see Module#remove_const, Object#remove_instance_variable...

Module#class_variable_defined?(name) -> bool (21337.0)

name で与えられた名前のクラス変数がモジュールに存在する場合 true を 返します。

...す。

@
param name Symbol か String を指定します。

//emlist[例][ruby]{
class
Fred
@
@foo = 99
end
Fred.class_variable_defined?(:@@foo) #=> true
Fred.class_variable_defined?(:@@bar) #=> false
Fred.class_variable_defined?('@@foo') #=> true
Fred.class_variable_defined?('@@bar')...
...#=> false
//}...

Module#class_variable_get(name) -> object (21325.0)

クラス/モジュールに定義されているクラス変数 name の値を返します。

...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
/...

Module#class_variable_set(name, val) -> object (21319.0)

クラス/モジュールにクラス変数 name を定義して、その値として val をセットします。val を返します。

...義して、その値として
val をセットします。val を返します。

@
param name String または Symbol を指定します。

//emlist[例][ruby]{
class
Fred
@
@foo = 99
def foo
@
@foo
end
end

def Fred.foo(val)
class
_variable_set(:@@foo, val)
end

p Fred.foo(101) # => 10...

OpenSSL::ASN1.#PrintableString(value) -> OpenSSL::ASN1::PrintableString -> OpenSSL::ASN1::PrintableString (18931.0)

ASN.1 の PrintableString 型の値を表現する Ruby のオブジェクトを 生成します。

....1 の PrintableString 型の値を表現する Ruby のオブジェクトを
生成します。

OpenSSL::ASN1::PrintableString.new と同じです。

@
param value ASN.1 値を表す Ruby のオブジェクト(文字列)
@
param tag タグ番号
@
param tagging タグ付けの方法(:IMPLICIT もし...
...くは :EXPLICIT)
@
param tag_class タグクラス(:UNIVERSAL, :CONTEXT_SPECIFIC, :APPLICATION, :PRIVATE のいずれか)...

絞り込み条件を変える

<< 1 2 3 ... > >>