180件ヒット
[1-100件を表示]
(0.079秒)
ライブラリ
- ビルトイン (60)
- delegate (12)
-
fiddle
/ import (12) - forwardable (48)
- json (12)
-
rdoc
/ generator / darkfish (12) -
rdoc
/ generator / ri (12) -
rubygems
/ specification (12)
クラス
- Class (12)
-
Gem
:: Specification (12) -
RDoc
:: Generator :: Darkfish (12) -
RDoc
:: Generator :: RI (12) -
Thread
:: Backtrace :: Location (48)
モジュール
-
Fiddle
:: Importer (12) - Forwardable (48)
-
JSON
:: Generator :: GeneratorMethods :: Object (12) - Kernel (12)
キーワード
- DelegateClass (12)
-
absolute
_ path (12) - allocate (12)
-
base
_ label (12) -
def
_ delegator (12) -
def
_ instance _ delegator (12) - delegate (12)
- inspect (12)
-
instance
_ delegate (12) - struct (12)
-
to
_ json (12) -
to
_ s (12) -
yaml
_ initialize (12)
検索結果
先頭5件
-
RDoc
:: Generator :: Darkfish # initialize(store , options) -> RDoc :: Generator :: Darkfish (21202.0) -
RDoc::Generator::Darkfish オブジェクトを初期化します。
...RDoc::Generator::Darkfish オブジェクトを初期化します。
@param store RDoc::Store オブジェクトを指定します。
@param options RDoc::Options オブジェクトを指定します。... -
RDoc
:: Generator :: RI # initialize(store , options) -> RDoc :: Generator :: RI (21202.0) -
RDoc::Generator::RI オブジェクトを初期化します。
...RDoc::Generator::RI オブジェクトを初期化します。
@param store RDoc::Store オブジェクトを指定します。
@param options RDoc::Options オブジェクトを指定します。... -
Thread
:: Backtrace :: Location # absolute _ path -> String (9107.0) -
self が表すフレームの絶対パスを返します。
...][ruby]{
# foo.rb
class Foo
attr_accessor :locations
def initialize(skip)
@locations = caller_locations(skip)
end
end
Foo.new(0..2).locations.map do |call|
puts call.absolute_path
end
# => /path/to/foo.rb
# /path/to/foo.rb
# /path/to/foo.rb
//}
@see Thread::Backtrace::Location#path... -
Gem
:: Specification # yaml _ initialize (9102.0) -
@todo
@todo -
Class
# allocate -> object (6107.0) -
自身のインスタンスを生成して返します。生成したオブジェクトは 自身のインスタンスであること以外には何も特性を持ちません。
...ェクトは
自身のインスタンスであること以外には何も特性を持ちません。
//emlist[例][ruby]{
klass = Class.new do
def initialize(*args)
@initialized = true
end
def initialized?
@initialized || false
end
end
klass.allocate.initialized? #=> false
//}... -
Forwardable
# def _ delegator(accessor , method , ali = method) -> () (6107.0) -
メソッドの委譲先を設定します。
...することが可能です。
def_delegator は def_instance_delegator の別名になります。
例:
require 'forwardable'
class MyQueue
extend Forwardable
attr_reader :queue
def initialize
@queue = []
end
def_delegator :@queue, :push, :mypush
end
q = MyQue......ue.new
q.mypush 42
q.queue # => [42]
q.push 23 # => NoMethodError
@see Forwardable#def_delegators... -
Forwardable
# def _ instance _ delegator(accessor , method , ali = method) -> () (6107.0) -
メソッドの委譲先を設定します。
...することが可能です。
def_delegator は def_instance_delegator の別名になります。
例:
require 'forwardable'
class MyQueue
extend Forwardable
attr_reader :queue
def initialize
@queue = []
end
def_delegator :@queue, :push, :mypush
end
q = MyQue......ue.new
q.mypush 42
q.queue # => [42]
q.push 23 # => NoMethodError
@see Forwardable#def_delegators... -
Forwardable
# delegate(hash) -> () (6107.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... -
Forwardable
# instance _ delegate(hash) -> () (6107.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...