るりまサーチ

最速Rubyリファレンスマニュアル検索!
144件ヒット [1-100件を表示] (0.129秒)

別のキーワード

  1. openssl p
  2. openssl p=
  3. fileutils mkdir_p
  4. _builtin $-p
  5. _builtin p

検索結果

<< 1 2 > >>

RDoc::Generator::Darkfish#initialize(store, options) -> RDoc::Generator::Darkfish (21302.0)

RDoc::Generator::Darkfish オブジェクトを初期化します。

...RDoc::Generator::Darkfish オブジェクトを初期化します。

@param store RDoc::Store オブジェクトを指定します。

@param options RDoc::Options オブジェクトを指定します。...

RDoc::Generator::RI#initialize(store, options) -> RDoc::Generator::RI (21302.0)

RDoc::Generator::RI オブジェクトを初期化します。

...RDoc::Generator::RI オブジェクトを初期化します。

@param store RDoc::Store オブジェクトを指定します。

@param options RDoc::Options オブジェクトを指定します。...

Object#initialize(*args, &block) -> object (18256.0)

ユーザ定義クラスのオブジェクト初期化メソッド。

...

initialize
には
Class#new に与えられた引数がそのまま渡されます。

サブクラスではこのメソッドを必要に応じて再定義されること
が期待されています。

initialize
という名前のメソッドは自動的に private に設定され
ます。

@p...
...ram args 初期化時の引数です。
@param block 初期化時のブロック引数です。必須ではありません。

//emlist[][ruby]{
class Foo
def initialize name
p
uts "initialize Foo"
@name = name
end
end

class Bar < Foo
def initialize name, pass
p
uts "initialize Bar"...
...super name
@pass = pass
end
end

it = Bar.new('myname','0500')
p
it
#=> initialize Bar
# initialize Foo
# #<Bar:0x2b68f08 @name="myname", @pass="0500">
//}

@see Class#new...

Gem::Specification#yaml_initialize (12102.0)

@todo

@todo

Object#_dump(limit) -> String (6231.0)

Marshal.#dump において出力するオブジェクトがメソッド _dump を定義している場合には、そのメソッドの結果が書き出されます。

...Marshal.#dump において出力するオブジェクトがメソッド _dump
を定義している場合には、そのメソッドの結果が書き出されます。

バージョン1.8.0以降ではObject#marshal_dump, Object#marshal_loadの使用
が推奨されます。 Marshal.dump するオ...
...mp と marshal_dump の両方の
メソッドを持つ場合は marshal_dump が優先されます。

メソッド _dump は引数として再帰を制限するレベル limit を受
け取り、オブジェクトを文字列化したものを返します。

インスタンスがメソッド _dump...
...あります。

@param limit 再帰の制限レベルを表す整数です。
@return オブジェクトを文字列化したものを返すように定義すべきです。

//emlist[][ruby]{
class Foo
def initialize(arg)
@foo = arg
end
def _dump(limit)
Marshal.dump(@foo, limit)
en...

絞り込み条件を変える

Kernel#DelegateClass(superclass) -> object (6219.0)

クラス superclass のインスタンスへメソッドを委譲するクラスを定義し、 そのクラスを返します。

...perclass のインスタンスへメソッドを委譲するクラスを定義し、
そのクラスを返します。

@param superclass 委譲先となるクラス

例:

//emlist{
require 'delegate'

class ExtArray < DelegateClass(Array)
def initialize
super([])
end
end
a = ExtArray.new
p
...
...a.class # => ExtArray
a.push 25
p
a # => [25]
//}...

Object#inspect -> String (6219.0)

オブジェクトを人間が読める形式に変換した文字列を返します。

...み込み関数 Kernel.#p は、このメソッドの結果を使用して
オブジェクトを表示します。

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

Thread::Backtrace::Location#inspect -> String (6213.0)

Thread::Backtrace::Location#to_s の結果を人間が読みやすいような文 字列に変換したオブジェクトを返します。

...][ruby]{
# foo.rb
class Foo
attr_accessor :locations
def initialize(skip)
@locations = caller_locations(skip)
end
end

Foo.new(0..2).locations.map do |call|
p
uts call.inspect
end

# => "path/to/foo.rb:5:in `initialize'"
# "path/to/foo.rb:9:in `new'"
# "path/to/foo.rb:9:in `<main>'"
//}...

Thread::Backtrace::Location#absolute_path -> String (6207.0)

self が表すフレームの絶対パスを返します。

...][ruby]{
# foo.rb
class Foo
attr_accessor :locations
def initialize(skip)
@locations = caller_locations(skip)
end
end

Foo.new(0..2).locations.map do |call|
p
uts call.absolute_path
end

# => /path/to/foo.rb
# /path/to/foo.rb
# /path/to/foo.rb
//}

@see Thread::Backtrace::Location#path...
<< 1 2 > >>