Class: PivotalAPI::Person

Inherits:
Base
  • Object
show all
Defined in:
lib/pivotal-tracker-api/person.rb

Direct Known Subclasses

Me, People

Instance Attribute Summary collapse

Class Method Summary collapse

Methods inherited from Base

from_json, #initialize, #to_json

Constructor Details

This class inherits a constructor from PivotalAPI::Base

Instance Attribute Details

#emailObject

Returns the value of attribute email.



4
5
6
# File 'lib/pivotal-tracker-api/person.rb', line 4

def email
  @email
end

#idObject

Returns the value of attribute id.



4
5
6
# File 'lib/pivotal-tracker-api/person.rb', line 4

def id
  @id
end

#initialsObject

Returns the value of attribute initials.



4
5
6
# File 'lib/pivotal-tracker-api/person.rb', line 4

def initials
  @initials
end

#kindObject

Returns the value of attribute kind.



4
5
6
# File 'lib/pivotal-tracker-api/person.rb', line 4

def kind
  @kind
end

#nameObject

Returns the value of attribute name.



4
5
6
# File 'lib/pivotal-tracker-api/person.rb', line 4

def name
  @name
end

#usernameObject

Returns the value of attribute username.



4
5
6
# File 'lib/pivotal-tracker-api/person.rb', line 4

def username
  @username
end

Class Method Details

.fieldsObject



6
7
8
# File 'lib/pivotal-tracker-api/person.rb', line 6

def self.fields
  ['name', 'id', 'initials', 'email', 'username', 'kind']
end

.unknownObject



10
11
12
13
14
15
16
17
18
19
# File 'lib/pivotal-tracker-api/person.rb', line 10

def self.unknown
  new({
    id: '0',
    name: 'Unkown',
    initials: 'Unkown',
    username: 'Unkown',
    email: 'Unkown',
    kind: 'person'
  })
end