Sha256: 66876c367dcab063364a76e470023023229c8b27c67c701a8b8655f735ab5daa

Contents?: true

Size: 603 Bytes

Versions: 19

Compression:

Stored size: 603 Bytes

Contents

module GoodData
  class Profile
    private_class_method :new
    attr_reader :user

    class << self
      def load
        # GoodData.logger.info "Loading user profile..."
        Profile.send 'new'
      end
    end

    def projects
      @json['accountSetting']['links']['projects']
    end

    def to_json
      @json
    end

    def [](key)
      @json['accountSetting'][key]
    end

    private

    def initialize
      @json = GoodData.get GoodData.connection.user['profile']
      @user = @json['accountSetting']['firstName'] + " " + @json['accountSetting']['lastName']
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
gooddata-0.5.16 lib/gooddata/models/profile.rb
gooddata-0.5.15 lib/gooddata/models/profile.rb
gooddata-0.5.14 lib/gooddata/models/profile.rb
gooddata-0.5.13 lib/gooddata/models/profile.rb
gooddata-0.5.12 lib/gooddata/models/profile.rb
gooddata-0.5.11 lib/gooddata/models/profile.rb
gooddata-0.5.10 lib/gooddata/models/profile.rb
gooddata-0.5.9 lib/gooddata/models/profile.rb
gooddata-0.5.8 lib/gooddata/models/profile.rb
gooddata-0.5.7 lib/gooddata/models/profile.rb
gooddata-0.5.6 lib/gooddata/models/profile.rb
gooddata-0.5.5 lib/gooddata/models/profile.rb
gooddata-0.5.4 lib/gooddata/models/profile.rb
gooddata-0.5.3 lib/gooddata/models/profile.rb
gooddata-0.5.2 lib/gooddata/models/profile.rb
gooddata-0.5.1 lib/gooddata/models/profile.rb
gooddata-0.5.0 lib/gooddata/models/profile.rb
gooddata-0.4.0 lib/gooddata/models/profile.rb
gooddata-0.2.0 lib/gooddata/models/profile.rb