るりまサーチ

最速Rubyリファレンスマニュアル検索!
22件ヒット [1-22件を表示] (0.020秒)
トップページ > クエリ:Module[x] > クエリ:attr_writer[x]

別のキーワード

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

ライブラリ

クラス

キーワード

検索結果

Module#attr_writer(*name) -> [Symbol] (39113.0)

インスタンス変数 name への書き込みメソッド (name=) を定義します。

...数 name への書き込みメソッド (name=) を定義します。

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

このメソッドで定義されるメソッドの定義は以...

Module#attr_writer(*name) -> nil (39101.0)

インスタンス変数 name への書き込みメソッド (name=) を定義します。

インスタンス変数 name への書き込みメソッド (name=) を定義します。


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

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

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

NEWS for Ruby 3.0.0 (102.0)

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

...is now a SyntaxError instead of a LocalJumpError. 15575
* When a class variable is overtaken by the same definition in an
ancestor class/module, a RuntimeError is now raised (previously,
it only issued a warning in verbose mode). Additionally, accessing a
class variable from the t...
...* Module
* Module#include and Module#prepend now affect classes and modules that have already included or prepended the receiver, mirroring the behavior if the arguments were included in the receiver before the other modules and classes included or prepended the receiver. 9573
* Module#pu...
...blic, Module#protected, Module#private, Module#public_class_method, Module#private_class_method, toplevel "private" and "public" methods now accept single array argument with a list of method names. 17314
* Module#attr_accessor, Module#attr_reader, Module#attr_writer and Module#attr methods now...

NEWS for Ruby 2.5.0 (60.0)

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

...thod#callを呼び出します 14142

* Module
* Module#attr, Module#attr_accessor, Module#attr_reader, Module#attr_writer はパブリックメソッドになりました 14132
* Module#define_method, Module#alias_method, Module#undef_method, Module#remove_method はパブリックメソ...