Sha256: 2c21a4e3c05fdba242e2bc5456e2b2723926979313ba109ce4c0e3ad1e1db203

Contents?: true

Size: 602 Bytes

Versions: 10

Compression:

Stored size: 602 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

10 entries across 10 versions & 1 rubygems

Version Path
gooddata-0.6.0.pre11 lib/gooddata/models/profile.rb
gooddata-0.6.0.pre10 lib/gooddata/models/profile.rb
gooddata-0.6.0.pre9 lib/gooddata/models/profile.rb
gooddata-0.6.0.pre8 lib/gooddata/models/profile.rb
gooddata-0.6.0.pre7 lib/gooddata/models/profile.rb
gooddata-0.6.0.pre6 lib/gooddata/models/profile.rb
gooddata-0.6.0.pre5 lib/gooddata/models/profile.rb
gooddata-0.6.0.pre4 lib/gooddata/models/profile.rb
gooddata-0.6.0.pre3 lib/gooddata/models/profile.rb
gooddata-0.6.0.pre2 lib/gooddata/models/profile.rb