857件ヒット
[1-100件を表示]
(0.121秒)
種類
- インスタンスメソッド (671)
- 定数 (186)
ライブラリ
- ビルトイン (766)
-
minitest
/ spec (7) - pp (60)
- psych (24)
キーワード
- <=> (12)
- === (12)
- =~ (9)
- DATA (12)
- NIL (8)
-
RUBY
_ COPYRIGHT (12) -
RUBY
_ DESCRIPTION (12) -
RUBY
_ ENGINE (12) -
RUBY
_ ENGINE _ VERSION (10) -
RUBY
_ PATCHLEVEL (12) -
RUBY
_ PLATFORM (12) -
RUBY
_ RELEASE _ DATE (12) -
RUBY
_ REVISION (12) -
RUBY
_ VERSION (12) -
SCRIPT
_ LINES _ _ (12) - STDERR (12)
- STDIN (12)
- STDOUT (12)
-
TOPLEVEL
_ BINDING (12) -
_ dump (12) - clone (12)
-
define
_ singleton _ method (24) - display (12)
-
enum
_ for (24) - hash (12)
- initialize (12)
-
initialize
_ clone (12) -
initialize
_ copy (12) -
initialize
_ dup (12) - inspect (12)
-
instance
_ of? (12) -
instance
_ variable _ defined? (12) -
instance
_ variable _ get (12) -
instance
_ variable _ set (12) -
instance
_ variables (12) -
is
_ a? (12) - itself (12)
-
kind
_ of? (12) - methods (12)
-
must
_ be _ instance _ of (1) -
must
_ be _ kind _ of (1) -
must
_ be _ nil (1) -
must
_ be _ within _ delta (1) -
must
_ be _ within _ epsilon (1) -
must
_ include (1) -
must
_ raise (1) - nil? (12)
-
object
_ id (12) -
pretty
_ inspect (12) -
pretty
_ print (12) -
pretty
_ print _ cycle (12) -
pretty
_ print _ inspect (12) -
pretty
_ print _ instance _ variables (12) -
private
_ methods (12) -
protected
_ methods (12) -
psych
_ to _ yaml (12) -
public
_ method (12) -
public
_ methods (12) -
public
_ send (24) -
remove
_ instance _ variable (12) -
respond
_ to? (12) -
respond
_ to _ missing? (12) -
singleton
_ class (12) -
singleton
_ method (12) -
singleton
_ methods (12) - taint (9)
- tainted? (9)
-
to
_ enum (24) -
to
_ int (12) -
to
_ io (12) -
to
_ s (12) -
to
_ str (12) -
to
_ yaml (12) - untaint (9)
-
yield
_ self (16)
検索結果
先頭5件
-
Object
:: TOPLEVEL _ BINDING -> Binding (12401.0) -
トップレベルでの Binding オブジェクト。
...トップレベルでの Binding オブジェクト。
詳細は Binding を参照してください。... -
Object
# pretty _ print _ inspect -> String (12301.0) -
Object#pretty_print を使って Object#inspect と同様に オブジェクトを人間が読める形式に変換した文字列を返します。
...
Object#pretty_print を使って Object#inspect と同様に
オブジェクトを人間が読める形式に変換した文字列を返します。
出力する全てのオブジェクトに Object#pretty_print が定義されている必要があります。
そうでない場合には RuntimeEr......ror が発生します。
@raise RuntimeError 出力する全てのオブジェクトに Object#pretty_print が定義されて
いない場合に発生します。... -
Object
# pretty _ print _ instance _ variables -> [String | Symbol] (12301.0) -
プリティプリント時に表示すべき自身のインスタンス変数名の配列をソートして返します。 返されたインスタンス変数はプリティプリント時に表示されます。
プリティプリント時に表示すべき自身のインスタンス変数名の配列をソートして返します。
返されたインスタンス変数はプリティプリント時に表示されます。
pp に表示したくないインスタンス変数がある場合にこのメソッドを再定義します。 -
Object
# define _ singleton _ method(symbol) { . . . } -> Symbol (12225.0) -
self に特異メソッド name を定義します。
...m symbol メソッド名を String または Symbol で指定します。
@param method Proc、Method あるいは UnboundMethod の
いずれかのインスタンスを指定します。
@return メソッド名を表す Symbol を返します。
//emlist[][ruby]{
class A
class <<......self
def class_name
to_s
end
end
end
A.define_singleton_method(:who_am_i) do
"I am: #{class_name}"
end
A.who_am_i # ==> "I am: A"
guy = "Bob"
guy.define_singleton_method(:hello) { "#{self}: Hello there!" }
guy.hello #=> "Bob: Hello there!"
//}... -
Object
# define _ singleton _ method(symbol , method) -> Symbol (12225.0) -
self に特異メソッド name を定義します。
...m symbol メソッド名を String または Symbol で指定します。
@param method Proc、Method あるいは UnboundMethod の
いずれかのインスタンスを指定します。
@return メソッド名を表す Symbol を返します。
//emlist[][ruby]{
class A
class <<......self
def class_name
to_s
end
end
end
A.define_singleton_method(:who_am_i) do
"I am: #{class_name}"
end
A.who_am_i # ==> "I am: A"
guy = "Bob"
guy.define_singleton_method(:hello) { "#{self}: Hello there!" }
guy.hello #=> "Bob: Hello there!"
//}... -
Object
# instance _ variable _ defined?(var) -> bool (12201.0) -
インスタンス変数 var が定義されていたら真を返します。
...//emlist[][ruby]{
class Fred
def initialize(p1, p2)
@a, @b = p1, p2
end
end
fred = Fred.new('cat', 99)
p fred.instance_variable_defined?(:@a) #=> true
p fred.instance_variable_defined?("@b") #=> true
p fred.instance_variable_defined?("@c") #=> false
//}
@see Object#instance_variable_......get,Object#instance_variable_set,Object#instance_variables... -
Object
:: RUBY _ ENGINE -> String (6207.0) -
Ruby処理系実装の種類を表す文字列。
...Ruby処理系実装の種類を表す文字列。
例:
$ ruby-1.9.1 -ve 'p RUBY_ENGINE'
ruby 1.9.1p0 (2009-03-04 revision 22762) [x86_64-linux]
"ruby"
$ jruby -ve 'p RUBY_ENGINE'
jruby 1.2.0 (ruby 1.8.6 patchlevel 287) (2009-03-16 rev 9419) [i386-java]
"jruby"... -
Object
# inspect -> String (6201.0) -
オブジェクトを人間が読める形式に変換した文字列を返します。
...ドの結果を使用して
オブジェクトを表示します。
//emlist[][ruby]{
[ 1, 2, 3..4, 'five' ].inspect # => "[1, 2, 3..4, \"five\"]"
Time.new.inspect # => "2008-03-08 19:43:39 +0900"
//}
inspect メソッドをオーバーライドしなかった場合、クラス......変数の名前、値の組を元にした文字列を返します。
//emlist[][ruby]{
class Foo
end
Foo.new.inspect # => "#<Foo:0x0300c868>"
class Bar
def initialize
@bar = 1
end
end
Bar.new.inspect # => "#<Bar:0x0300c868 @bar=1>"
//}
@see Kernel.#p... -
Object
# pretty _ inspect -> String (6201.0) -
self を pp で表示したときの結果を文字列として返します。
self を pp で表示したときの結果を文字列として返します。