Sha256: 7128951c18de668c26d432481bcba062b2305650018bab018771cdfbfe8a988a
Contents?: true
Size: 445 Bytes
Versions: 26
Compression:
Stored size: 445 Bytes
Contents
module AngularSprinkles class ConstructorCollection def initialize(args) @json_wrapper = args.fetch(:json_wrapper) @object_wrapper = args.fetch(:object_wrapper) @collection = [] end def push(object, key) bundle = @object_wrapper.new(object, key, @json_wrapper) @collection.push(bundle) end def to_json @collection.map!(&:to_json).join("\n") end alias :to_s :to_json end end
Version data entries
26 entries across 26 versions & 1 rubygems