るりまサーチ (Ruby 3.3)

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

別のキーワード

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

ライブラリ

クラス

検索結果

Module#attr_accessor(*name) -> [Symbol] (54679.0)

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

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

//emlist[例][ruby]{
class User
attr_accessor :name # => [:name, :name=]
# 複数の名前を渡すこともできる
attr_accessor :id, :age # => [:id, :id=, :age, :age=]
end
//}

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

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

NEWS for Ruby 3.0.0 (109.0)

NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...YAML. 8382
* Use officially discouraged. Read OpenStruct@Caveats section.
* Pathname
* Ractor compatible.
* Psych
* Update to Psych 3.3.0
* This version is Ractor compatible.
* Reline
* Update to Reline 0.1.5
* RubyGems
* Update to RubyGems 3.2.3
* StringIO
* U...

クラス/メソッドの定義 (91.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...