42件ヒット
[1-42件を表示]
(0.010秒)
別のキーワード
種類
- インスタンスメソッド (24)
- 文書 (18)
ライブラリ
- forwardable (24)
モジュール
- Forwardable (24)
キーワード
-
NEWS for Ruby 2
. 7 . 0 (6) - Ruby用語集 (12)
-
instance
_ delegate (12)
検索結果
先頭4件
-
Forwardable
# delegate(hash) -> () (18120.0) -
メソッドの委譲先を設定します。
...配列で指定します。
例:
require 'forwardable'
class Zap
extend Forwardable
delegate :length => :@str
delegate [:first, :last] => :@arr
def initialize
@arr = %w/foo bar baz/
@str = "world"
end
end
zap = Zap.new
zap.length # => 5
zap.fi... -
Forwardable
# instance _ delegate(hash) -> () (6120.0) -
メソッドの委譲先を設定します。
...配列で指定します。
例:
require 'forwardable'
class Zap
extend Forwardable
delegate :length => :@str
delegate [:first, :last] => :@arr
def initialize
@arr = %w/foo bar baz/
@str = "world"
end
end
zap = Zap.new
zap.length # => 5
zap.fi... -
Ruby用語集 (324.0)
-
Ruby用語集 A B C D E F G I J M N O R S Y
...語集
A B C D E F G I J M N O R S Y
a ka sa ta na ha ma ya ra wa
=== 記号・数字
: %記法
: % notation
「%」記号で始まる多種多様なリテラル記法の総称。
参照:d:spec/literal#percent
: 0 オリジン
: zero-based......ッシュに呼び出しを丸投げすることで実装が簡素化できる。
標準添付ライブラリーには、委譲を支援する delegate や
forwardable がある。
: イテレーター
: iterator
一般には繰り返し(反復)を抽象化する仕組み全般を指す......参照:Symbol
: シンボル配列
要素がシンボル(Symbol オブジェクト)だけからなる配列。
配列式としては % 記法で書くこともできる。
参照:d:spec/literal#percent
: 数値オブジェクト
Numeric クラスのサブクラスのインス... -
NEWS for Ruby 2
. 7 . 0 (24.0) -
NEWS for Ruby 2.7.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
....produce(Date.today, &:succ) #=> infinite sequence of dates
dates.detect(&:tuesday?) #=> next Tuesday
//}
//emlist[Enumerator::Lazy#eager][ruby]{
a = %w(foo bar baz)
e = a.lazy.map {|x| x.upcase }.map {|x| x + "!" }.eager
p e.class #=> Enumerator
p e.map {|x| x + "?" } #=> ["FOO!?", "......* Date.jisx0301, Date#jisx0301, Date.parseが新しい日本の年号を
サポートしました。 15742
* Delegator
* Object#DelegateClassがブロックを受け付けるようになり、
Class.newやStruct.newのように返り値のクラスのコンテキストで......たにdefault gemsになりました。
* 以下のdefault gemがrubygems.orgで公開されました。
* benchmark
* cgi
* delegate
* getoptlong
* net-pop
* net-smtp
* open3
* pstore
* readline
* readline-ext
* singleton
*...