ライブラリ
- ビルトイン (144)
- erb (12)
- forwardable (24)
- psych (12)
- win32ole (24)
クラス
- BasicObject (24)
- ERB (12)
- Module (12)
- Object (12)
-
RDoc
:: Options (12) -
WIN32OLE
_ EVENT (12) -
WIN32OLE
_ TYPE (12)
モジュール
- Enumerable (96)
- Forwardable (24)
キーワード
- ! (12)
- != (12)
-
NEWS for Ruby 2
. 5 . 0 (8) -
NEWS for Ruby 3
. 0 . 0 (5) -
NEWS for Ruby 3
. 1 . 0 (4) - Symbol (12)
-
def
_ delegator (12) -
def
_ instance _ delegator (12) -
default
_ event _ sources (12) -
extra
_ accessor _ flags (12) - handler= (12)
- max (48)
- min (48)
- new (12)
-
rb
_ mod _ attr _ reader (12) -
rdoc
/ parser / ruby (12) -
rexml
/ parsers / streamparser (12) -
ruby 1
. 6 feature (12) -
ruby 1
. 9 feature (12) -
yaml
_ tag (12)
検索結果
先頭5件
-
Module
# attr _ reader(*name) -> [Symbol] (24226.0) -
インスタンス変数 name の読み取りメソッドを定義します。
...タンス変数 name の読み取りメソッドを定義します。
//emlist[例][ruby]{
class User
attr_reader :name # => [:name]
# 複数の名前を渡すこともできる
attr_reader :id, :age # => [:id, :age]
end
//}
このメソッドで定義されるメソッドの定義は以下... -
Module
# attr _ reader(*name) -> nil (24202.0) -
インスタンス変数 name の読み取りメソッドを定義します。
インスタンス変数 name の読み取りメソッドを定義します。
このメソッドで定義されるメソッドの定義は以下の通りです。
//emlist[例][ruby]{
def name
@name
end
//}
@param name String または Symbol を 1 つ以上指定します。 -
static VALUE rb
_ mod _ attr _ reader(int argc , VALUE *argv , VALUE klass) (12200.0) -
-
rdoc
/ parser / ruby (60.0) -
Ruby のソースコードを解析するためのサブライブラリです。
...についても同様に :attr:、 :attr_reader:、 :attr_writer:、
:attr_accessor: を指定する事ができます。属性の名前は省略できます。
##
# :attr_reader: my_attr_name
=== 隠しメソッド、属性
:method:、 :singleton-method: や :attr: 命令を使う事で実......際には定義され
ていないメソッドもドキュメントに含める事ができます。
##
# :attr_writer: ghost_writer
# There is an attribute here, but you can't see it!
##
# :method: ghost_method
# There is a method here, but you can't see it!
##
# this is a commen... -
NEWS for Ruby 3
. 0 . 0 (36.0) -
NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...vel "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 return an array of defined method names as symbols. 17314
* Module#alias_method now returns the de......eywords does not allocate a hash.
* `super` is optimized when the same type of method is called in the previous call if it's not refinements or an attr reader or writer.
=== JIT
* Performance improvements of JIT-ed code
* Microarchitectural optimizations
* Native functions shared b... -
NEWS for Ruby 2
. 5 . 0 (30.0) -
NEWS for Ruby 2.5.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...* Method
* Method#=== は Proc#===と同じようにMethod#callを呼び出します 14142
* Module
* Module#attr, Module#attr_accessor, Module#attr_reader, Module#attr_writer はパブリックメソッドになりました 14132
* Module#define_method, Module#alias_method, Module#u... -
RDoc
:: Options # extra _ accessor _ flags -> {String => String} (24.0) -
コマンドライン引数の --accessor オプションで指定したアクセサがキー、ア クセサの種類が値のハッシュを返します。
...コマンドライン引数の --accessor オプションで指定したアクセサがキー、ア
クセサの種類が値のハッシュを返します。
値は r、w、rw のいずれかです。それぞれ attr_reader、attr_writer、
attr_accessor に対応します。... -
ruby 1
. 6 feature (18.0) -
ruby 1.6 feature ruby version 1.6 は安定版です。この版での変更はバグ修正がメイン になります。
...とがありました。((<ruby-dev:13752>))
: attr_*
アクセサに余計な引数を渡してもエラーになりませんでした。
((<ruby-dev:13748>))
class C
def initialize
@message = 'ok'
end
attr_reader :message
end
puts C.new.message(1,2,3)... -
ruby 1
. 9 feature (18.0) -
ruby 1.9 feature ruby version 1.9.0 は開発版です。 以下にあげる機能は将来削除されたり互換性のない仕様変更がなされるかもしれません。 1.9.1 以降は安定版です。 バグ修正がメインになります。
...6
: __send
: __send!
追加
: invoke_method
: invoke_functional_method
削除
=== 2006-07-21
: Module#attr
オプショナル引数の assignable がなくなり、attr_reader 相当になりました
[RCR#331]
=== 2006-06-22
: Module#name
無名モジュールに対しては nil... -
BasicObject
# ! -> bool (12.0) -
オブジェクトを真偽値として評価し、その論理否定を返します。
...トが偽であれば真、さもなくば偽
//emlist[例][ruby]{
class NegationRecorder < BasicObject
def initialize
@count = 0
end
attr_reader :count
def !
@count += 1
super
end
end
recorder = NegationRecorder.new
!recorder
!!!!!!!recorder
puts 'hoge' if !recorder
puts... -
BasicObject
# !=(other) -> bool (12.0) -
オブジェクトが other と等しくないことを判定します。
...クト
@see BasicObject#==, BasicObject#!
//emlist[例][ruby]{
class NonequalityRecorder < BasicObject
def initialize
@count = 0
end
attr_reader :count
def !=(other)
@count += 1
super
end
end
recorder = NonequalityRecorder.new
recorder != 1
puts 'hoge' if recorder != "str"...