Sha256: 8886019bb9e45f5b783f35107356e350f5d9c4928309e510779b04c916b95dbc
Contents?: true
Size: 305 Bytes
Versions: 15
Compression:
Stored size: 305 Bytes
Contents
module Kernel # Like returning but exectues the block # via instance_eval. # # def foo # with values = [] do # self << 'bar' # self << 'baz' # end # end # # foo # => ['bar', 'baz'] # def with(obj=self, &block) obj.instance_eval(&block) end end
Version data entries
15 entries across 14 versions & 2 rubygems