別のキーワード
ライブラリ
- ビルトイン (91)
-
shell
/ error (6) - socket (48)
モジュール
- Kernel (37)
-
Socket
:: Constants (24)
キーワード
- CantApplyMethod (6)
-
IFF
_ ISATAP (24) -
IFF
_ OVS _ DATAPATH (24) - Proc (12)
- lambda (18)
- proc (19)
-
rb
_ data _ object _ alloc (12) - then (14)
-
yield
_ self (16) - 手続きオブジェクトの挙動の詳細 (12)
検索結果
先頭5件
-
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...