948件ヒット
[1-100件を表示]
(0.111秒)
ライブラリ
- ビルトイン (636)
- forwardable (24)
- json (36)
-
json
/ add / bigdecimal (12) -
json
/ add / exception (12) - optparse (144)
- rake (12)
-
rdoc
/ markup (12) -
webrick
/ httputils (60)
クラス
-
ARGF
. class (84) - BigDecimal (12)
- Class (12)
- Exception (12)
- Method (12)
- Module (336)
- Object (132)
- OptionParser (144)
-
RDoc
:: Markup (12) - String (12)
- Thread (12)
-
Thread
:: Backtrace :: Location (48) - UnboundMethod (12)
-
WEBrick
:: HTTPUtils :: FormData (60)
モジュール
キーワード
- === (12)
- [] (12)
-
_ dump (12) -
absolute
_ path (12) -
add
_ special (12) - arity (12)
- attr (12)
-
attr
_ accessor (4) -
attr
_ reader (4) -
attr
_ writer (4) - backtrace (12)
-
base
_ label (12) -
class
_ variable _ defined? (12) -
class
_ variable _ get (12) -
class
_ variable _ set (12) -
const
_ defined? (12) -
const
_ get (12) -
const
_ source _ location (12) -
define
_ method (24) -
define
_ singleton _ method (24) - delegate (12)
- filename (12)
- filename= (12)
- getc (12)
- inspect (42)
-
instance
_ delegate (12) -
instance
_ method (12) -
json
_ creatable? (12) -
method
_ defined? (12) - name (24)
- name= (12)
- on (144)
- pathmap (12)
- private (48)
-
private
_ method _ defined? (12) -
protected
_ method _ defined? (12) -
public
_ class _ method (24) -
public
_ constant (12) -
public
_ method (12) -
public
_ method _ defined? (12) - putc (12)
-
read
_ nonblock (12) - readpartial (12)
-
remove
_ class _ variable (12) -
remove
_ const (12) -
set
_ encoding (36) -
singleton
_ class (12) -
singleton
_ method (12) -
to
_ json (36) -
to
_ json _ raw _ object (12) -
to
_ s (42) -
to
_ str (12) -
undef
_ method (12)
検索結果
先頭5件
-
Object
# class -> Class (21263.0) -
レシーバのクラスを返します。
...レシーバのクラスを返します。
//emlist[][ruby]{
p "ruby".class #=> String
p 100.class #=> Integer
p ARGV.class #=> Array
p self.class #=> Object
p Class.class #=> Class
p Kernel.class #=> Module
//}
@see Class#superclass,Object#kind_of?,Object#instance_of?... -
Class
# json _ creatable? -> bool (15107.0) -
シリアライズされた JSON 形式の文字列から、インスタンスを作成するのにこのクラスを使用できる場合は 真を返します。そうでない場合は、偽を返します。
...json_create というメソッドを実装していなければなりません。
また json_create の第一引数は必要なデータを含むハッシュを期待しています。
//emlist[例][ruby]{
require "json"
String.json_creatable? # => true
Dir.json_creatable? # => false
//}... -
Module
# public _ class _ method(*name) -> self (12239.0) -
name で指定したクラスメソッド (クラスの特異メソッド) の 可視性を public に変更します。
...可視性を public に変更します。
@param name 0 個以上の String または Symbol を指定します。
@param names 0 個以上の String または Symbol を Array で指定します。
//emlist[例][ruby]{
class Foo
def self.foo
"foo"
end
private_class_method :foo
end
F......oo.foo # NoMethodError: private method `foo' called for Foo:Class
Foo.public_class_method(:foo) # => Foo
Foo.foo # => "foo"
//}... -
Module
# public _ class _ method(names) -> self (12239.0) -
name で指定したクラスメソッド (クラスの特異メソッド) の 可視性を public に変更します。
...可視性を public に変更します。
@param name 0 個以上の String または Symbol を指定します。
@param names 0 個以上の String または Symbol を Array で指定します。
//emlist[例][ruby]{
class Foo
def self.foo
"foo"
end
private_class_method :foo
end
F......oo.foo # NoMethodError: private method `foo' called for Foo:Class
Foo.public_class_method(:foo) # => Foo
Foo.foo # => "foo"
//}... -
Module
# class _ variable _ defined?(name) -> bool (12238.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') #=> fal... -
Module
# remove _ class _ variable(name) -> object (12226.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 _ get(name) -> object (12220.0) -
クラス/モジュールに定義されているクラス変数 name の値を返します。
...ame の値を返します。
@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 (12220.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) # => 101
p Fred.new.foo # =>... -
Object
# singleton _ class -> Class (9251.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...