るりまサーチ

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

別のキーワード

  1. openssl new
  2. _builtin new
  3. rexml/document new
  4. resolv new
  5. socket new

ライブラリ

モジュール

検索結果

NEWS for Ruby 2.7.0 (26054.0)

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

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

それぞれのエントリーは参照情報があるため短いです。
十分な情報と共に書かれた全ての変更のリス...
...name: "Alice", children: [{name: "Charlie", age: age}]}
#=> NoMatchingPatternError
//}

* 詳細は https://speakerdeck.com/k_tsj/pattern-matching-new-feature-in-ruby-2-dot-7 のスライドを参照してください。
* スライドは少し古い内容になっていることに注意して...
.../ruby/csv/blob/master/NEWS.md

* Date
* Date.jisx0301, Date#jisx0301, Date.parseが新しい日本の年号を
サポートしました。 15742

* Delegator
* Object#DelegateClassがブロックを受け付けるようになり、
Class.newやStruct.newのように返り値...

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

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

...ラスを定義し、
そのクラスを返します。

@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]
//}...