Sha256: 1f4118c125a06f3f8f80e9f0a1808ef8e0135be215ec3925858a741b38cca4c9
Contents?: true
Size: 326 Bytes
Versions: 3
Compression:
Stored size: 326 Bytes
Contents
module Garb class Account attr_reader :id, :name, :profiles def initialize(profiles) @id = profiles.first.account_id @name = profiles.first.account_name @profiles = profiles end def self.all Profile.all.group_by{|p| p.account_id}.map{|profiles| new(profiles)} end end end
Version data entries
3 entries across 3 versions & 3 rubygems
Version | Path |
---|---|
jonuts-garb-0.2.4 | lib/garb/account.rb |
vigetlabs-garb-0.2.4 | lib/garb/account.rb |
garb-0.2.4 | lib/garb/account.rb |