るりまサーチ

最速Rubyリファレンスマニュアル検索!
169件ヒット [1-100件を表示] (0.020秒)

別のキーワード

  1. object tap
  2. _builtin tap
  3. tap object
  4. tap _builtin

ライブラリ

クラス

モジュール

検索結果

<< 1 2 > >>

Object#tap {|x| ... } -> self (18125.0)

self を引数としてブロックを評価し、self を返します。

...のメソッドの主目的です。

//emlist[][ruby]{
(1..10) .tap {|x| puts "original: #{x}" }
.to_a .tap {|x| puts "array: #{x}" }
.select {|x| x.even? } .tap {|x| puts "evens: #{x}" }
.map {|x| x*x } .tap {|x| puts "squares: #{x}" }
//}...
...目的です。

//emlist[][ruby]{
(1..10) .tap {|x| puts "original: #{x}" }
.to_a .tap {|x| puts "array: #{x}" }
.select {|x| x.even? } .tap {|x| puts "evens: #{x}" }
.map {|x| x*x } .tap {|x| puts "squares: #{x}" }
//}

@see Object#yield_self...

Socket::Constants::IFF_ISATAP (6100.0)

ISATAP interface (RFC4214)

...ISATAP interface (RFC4214)...

Socket::Constants::IFF_OVS_DATAPATH (6100.0)

device used as Open vSwitch datapath port

...device used as Open vSwitch datapath port...

Socket::IFF_ISATAP (6100.0)

ISATAP interface (RFC4214)

...ISATAP interface (RFC4214)...

Socket::IFF_OVS_DATAPATH (6100.0)

device used as Open vSwitch datapath port

...device used as Open vSwitch datapath port...

絞り込み条件を変える

Shell::Error::CantApplyMethod (6000.0)

メソッドを適用できないときに発生する例外です。

メソッドを適用できないときに発生する例外です。

VALUE rb_data_object_alloc(VALUE klass, void *datap, RUBY_DATA_FUNC dmark, RUBY_DATA_FUNC dfree) (100.0)

datap をラップするオブジェクトを生成し、返します。 そのクラスは klass となり、datap をマークするときは dmark、解放するときは dfree を使うようになります。

...datap をラップするオブジェクトを生成し、返します。
そのクラスは klass となり、datap をマークするときは
dmark、解放するときは dfree を使うようになります。...

Kernel.#lambda -> Proc (6.0)

与えられたブロックから手続きオブジェクト (Proc のインスタンス) を生成して返します。Proc.new に近い働きをします。

..._proc }
f.call
return :from_method
end

def test_lambda
f = lambda { return :from_lambda }
f.call
return :from_method
end

def test_block
tap
{ return :from_block }
return :from_method
end

p test_proc() #=> :from_proc
p test_lambda() #=> :from_method
p test_block() #=> :from_block...

Kernel.#lambda { ... } -> Proc (6.0)

与えられたブロックから手続きオブジェクト (Proc のインスタンス) を生成して返します。Proc.new に近い働きをします。

..._proc }
f.call
return :from_method
end

def test_lambda
f = lambda { return :from_lambda }
f.call
return :from_method
end

def test_block
tap
{ return :from_block }
return :from_method
end

p test_proc() #=> :from_proc
p test_lambda() #=> :from_method
p test_block() #=> :from_block...

Kernel.#proc -> Proc (6.0)

与えられたブロックから手続きオブジェクト (Proc のインスタンス) を生成して返します。Proc.new に近い働きをします。

..._proc }
f.call
return :from_method
end

def test_lambda
f = lambda { return :from_lambda }
f.call
return :from_method
end

def test_block
tap
{ return :from_block }
return :from_method
end

p test_proc() #=> :from_proc
p test_lambda() #=> :from_method
p test_block() #=> :from_block...

絞り込み条件を変える

<< 1 2 > >>