Sha256: 35f44dcd8aadb3b69f3e0b544bd09864140d448d0e74a7ec39e379f1d9bfce87
Contents?: true
Size: 721 Bytes
Versions: 54
Compression:
Stored size: 721 Bytes
Contents
module Awardee def acquired_medals(organization=Organization.current) @acquired_medals ||= medals_for awarded_contents_in(organization) end def unacquired_medals(organization=Organization.current) @unacquired_medals ||= medals_for unawarded_contents_in(organization) end private def medals_for(content) content.map(&:medal) end def awarded_contents_in(organization) awardable_contents_in(organization).first end def unawarded_contents_in(organization) awardable_contents_in(organization).second end def awardable_contents_in(organization) @awardable_contents_in ||= organization.awardable_contents.partition { |c| c.once_completed_for? self, organization } end end
Version data entries
54 entries across 54 versions & 2 rubygems