Sha256: d8ed9e609889987a4fa747e835baed56e379edf4f0a5055be2cfaf7e167ef358
Contents?: true
Size: 441 Bytes
Versions: 5
Compression:
Stored size: 441 Bytes
Contents
module Shogun class Presenters def initialize(resources:, cast:, meta: {}, links: {}, linked: {}) @sources = resources.map do |resource| cast.new(resource: resource) end @meta = meta @links = links @linked = linked end def map(&block) @sources.map(&block) end def meta @meta end def linked @linked end def links @links end end end
Version data entries
5 entries across 5 versions & 1 rubygems