Sha256: bf919396e0e021692538523160d29c308568240e16bcf636cd9ae77187bebc13
Contents?: true
Size: 578 Bytes
Versions: 62
Compression:
Stored size: 578 Bytes
Contents
module CurationConcerns class VersionListPresenter def initialize(version_list) @raw_list = version_list end delegate :each, to: :wrapped_list private def wrapped_list @wrapped_list ||= @raw_list.map { |v| CurationConcerns::VersionPresenter.new(v) } # wrap each item in a presenter .sort { |a, b| b.version.created <=> a.version.created } # sort list of versions based on creation date .tap { |l| l.first.try(:current!) } # set the first version to the current version end end end
Version data entries
62 entries across 62 versions & 1 rubygems