るりまサーチ (Ruby 2.2.0)

最速Rubyリファレンスマニュアル検索!
4件ヒット [1-4件を表示] (0.032秒)
トップページ > バージョン:2.2.0[x] > クエリ:*[x] > クエリ:attr_accessor[x]

別のキーワード

  1. net/imap attr
  2. module attr
  3. _builtin attr
  4. rdoc attr_modifiers
  5. etc sc_thread_attr_stackaddr

ライブラリ

クラス

検索結果

Module#attr_accessor(*name) -> nil (54604.0)

インスタンス変数 name に対する読み取りメソッドと書き込みメソッドの両方を 定義します。

インスタンス変数 name に対する読み取りメソッドと書き込みメソッドの両方を
定義します。


このメソッドで定義されるメソッドの定義は以下の通りです。

//emlist[例][ruby]{
def name
@name
end
def name=(val)
@name = val
end
//}

@param name String または Symbol を 1 つ以上指定します。

static VALUE rb_mod_attr_accessor(int argc, VALUE *argv, VALUE klass) (18601.0)

クラス/メソッドの定義 (1423.0)

クラス/メソッドの定義 * クラス/メソッドの定義: * class * singleton_class * module * method * operator * nest_method * eval_method * singleton_method * class_method * limit * 定義に関する操作: * alias * undef * defined

クラス/メソッドの定義
* クラス/メソッドの定義:
* class
* singleton_class
* module
* method
* operator
* nest_method
* eval_method
* singleton_method
* class_method
* limit
* 定義に関する操作:
* alias
* undef
* defined

===[a:class] クラス定義

//emlist[例][ruby]{
class Foo < S...

Thread::Backtrace::Location (37.0)

Ruby のフレームを表すクラスです。

Ruby のフレームを表すクラスです。

Kernel.#caller_locations から生成されます。

//emlist[例1][ruby]{
# caller_locations.rb
def a(skip)
caller_locations(skip)
end
def b(skip)
a(skip)
end
def c(skip)
b(skip)
end

c(0..2).map do |call|
puts call.to_s
end
//}

例1の実行結果:

caller_locations.rb:2:in `a'
caller_locations...