Sha256: ac23ae105b3128e0e119b1e657895242d56a1e0578c4d77ae82994dd4f5da601
Contents?: true
Size: 271 Bytes
Versions: 1
Compression:
Stored size: 271 Bytes
Contents
require 'alba/association' module Alba # Representing many association class Many < Association def to_hash(target) objects = target.public_send(@name) @resource ||= resource_class objects.map { |o| @resource.new(o).to_hash } end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
alba-0.9.0 | lib/alba/many.rb |