1039件ヒット
[1001-1039件を表示]
(0.120秒)
別のキーワード
ライブラリ
- ビルトイン (703)
- json (48)
-
json
/ add / bigdecimal (12) -
json
/ add / complex (12) -
json
/ add / date (12) -
json
/ add / date _ time (12) -
json
/ add / exception (12) -
json
/ add / range (12) -
json
/ add / rational (12) -
json
/ add / regexp (12) -
json
/ add / struct (12) -
json
/ add / time (12) - optparse (144)
-
rexml
/ document (24)
クラス
-
ARGF
. class (84) - BigDecimal (12)
- Complex (12)
- Date (12)
- DateTime (12)
- Exception (12)
- Method (36)
- Module (396)
- NilClass (7)
- Object (132)
- OptionParser (144)
-
REXML
:: CData (24) - Range (12)
- Rational (12)
- Regexp (12)
- Struct (12)
-
Thread
:: Backtrace :: Location (48) - Time (12)
モジュール
キーワード
- === (12)
- =~ (7)
-
_ dump (12) -
absolute
_ path (12) - attr (12)
-
attr
_ accessor (4) -
attr
_ reader (4) -
attr
_ writer (4) - autoload (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) - getc (12)
- gets (36)
-
inplace
_ mode (12) - inspect (48)
-
instance
_ method (12) -
method
_ defined? (12) - name (12)
- on (144)
- private (48)
-
private
_ class _ method (24) -
private
_ constant (12) -
private
_ method _ defined? (12) -
protected
_ method _ defined? (12) -
public
_ class _ method (24) -
public
_ constant (12) -
public
_ method (12) -
public
_ method _ defined? (12) - read (12)
- readchar (12)
-
remove
_ class _ variable (12) -
remove
_ const (12) -
remove
_ method (12) -
singleton
_ class (12) -
singleton
_ method (12) -
source
_ location (12) -
to
_ json (168) -
to
_ s (60) -
to
_ str (12) -
undef
_ method (12) - value (12)
検索結果
先頭4件
-
Module
# public _ constant(*name) -> self (49.0) -
name で指定した定数の可視性を public に変更します。
...lic に変更します。
@param name 0 個以上の String か Symbol を指定します。
@raise NameError 存在しない定数を指定した場合に発生します。
@return self を返します。
//emlist[例][ruby]{
module SampleModule
class SampleInnerClass
end
# => 非公開......nerClass
end
begin
SampleModule::SampleInnerClass
rescue => e
e # => #<NameError: private constant SampleModule::SampleInnerClass referenced>
end
module SampleModule
# => 非公開クラスであることは承知で利用するために public にする
public_constant :SampleInnerClass
e......nd
SampleModule::SampleInnerClass # => SampleModule::SampleInnerClass
//}
@see Module#private_constant, Object#untrusted?......nd
SampleModule::SampleInnerClass # => SampleModule::SampleInnerClass
//}
@see Module#private_constant... -
Module
# public _ method _ defined?(name , inherit=true) -> bool (49.0) -
インスタンスメソッド name がモジュールに定義されており、 しかもその可視性が public であるときに true を返します。 そうでなければ false を返します。
...うでなければ false を返します。
@param name Symbol か String を指定します。
@param inherit 真を指定するとスーパークラスや include したモジュールで
定義されたメソッドも対象になります。
@see Module#method_defined?, Module#private_me......thod_defined?, Module#protected_method_defined?
//emlist[例][ruby]{
module A
def method1() end
end
class B
protected
def method2() end
end
class C < B
include A
def method3() end
end
A.method_defined? :method1 #=> true
C.public_method_defined? "method1" #=> tr... -
Module
# const _ defined?(name , inherit = true) -> bool (43.0) -
モジュールに name で指定される名前の定数が定義されている時真 を返します。
...することができます。
@param name String, Symbol で指定される定数名。
@param inherit false を指定するとスーパークラスや include したモジュールで
定義された定数は対象にはなりません。
//emlist[例][ruby]{
module Kernel
FOO = 1
end......true を返す
p Object.const_defined?(:FOO) # => true
module Bar
BAR = 1
end
class Object
include Bar
end
# ユーザ定義のモジュールに対しても同様
p Object.const_defined?(:BAR) # => true
class Baz
include Bar
end
# Object 以外でも同様になった
# 第二引数の... -
Object
# public _ method(name) -> Method (43.0) -
オブジェクトの public メソッド name をオブジェクト化した Method オブジェクトを返します。
...返します。
@param name メソッド名を Symbol または String で指定します。
@raise NameError 定義されていないメソッド名や、
protected メソッド名、 private メソッド名を引数として与えると発生します。
//emlist[][ruby]{
1.public_method(......:to_int) #=> #<Method: Integer#to_int>
1.public_method(:p) # method `p' for class `Integer' is private (NameError)
//}
@see Object#method,Object#public_send,Module#public_instance_method...