Sha256: 0898d7359a70ca4b7dbc066ed1863a545c39d87b4ae94d33f65368e4c061a9e4

Contents?: true

Size: 332 Bytes

Versions: 15

Compression:

Stored size: 332 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_to_array{|p| p.account_id}.map{|profiles| new(profiles)}
    end
  end
end

Version data entries

15 entries across 15 versions & 4 rubygems

Version Path
jonuts-garb-0.2.6 lib/garb/account.rb
macros-garb-0.2.6 lib/garb/account.rb
vigetlabs-garb-0.2.5 lib/garb/account.rb
vigetlabs-garb-0.2.6 lib/garb/account.rb
garb-0.5.1 lib/garb/account.rb
garb-0.5.0 lib/garb/account.rb
garb-0.4.2 lib/garb/account.rb
garb-0.4.1 lib/garb/account.rb
garb-0.4.0 lib/garb/account.rb
garb-0.3.2 lib/garb/account.rb
garb-0.3.1 lib/garb/account.rb
garb-0.3.0 lib/garb/account.rb
garb-0.2.9 lib/garb/account.rb
garb-0.2.8 lib/garb/account.rb
garb-0.2.6 lib/garb/account.rb