Sha256: 4caa240029018ca3865c14da598bfabd199d12a0a5487821715a8d1ae12c9e70
Contents?: true
Size: 306 Bytes
Versions: 8
Compression:
Stored size: 306 Bytes
Contents
module Kernel # Like returning but exectures 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
8 entries across 8 versions & 2 rubygems