Sha256: fb5696acf06f57aaf42b5d3cd892c4e50fa0e871f0a58cade377bf66a8cb1812
Contents?: true
Size: 633 Bytes
Versions: 15
Compression:
Stored size: 633 Bytes
Contents
class Object #:nodoc: # A Ruby-ized realization of the K combinator, courtesy of Mikael Brockman. # # def foo # returning values = [] do # values << 'bar' # values << 'baz' # end # end # # foo # => ['bar', 'baz'] # # def foo # returning [] do |values| # values << 'bar' # values << 'baz' # end # end # # foo # => ['bar', 'baz'] # def returning(value) yield(value) value end def with_options(options) yield ActiveSupport::OptionMerger.new(self, options) end def to_json ActiveSupport::JSON.encode(self) end end
Version data entries
15 entries across 15 versions & 4 rubygems