Class: StrawberryAPI::User
- Inherits:
- 
      Object
      
        - Object
- StrawberryAPI::User
 
- Defined in:
- lib/strawberry_api/user.rb
Instance Attribute Summary collapse
- 
  
    
      #authentication_token  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Returns the value of attribute authentication_token. 
- 
  
    
      #created_at  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Returns the value of attribute created_at. 
- 
  
    
      #firstname  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Returns the value of attribute firstname. 
- 
  
    
      #id  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Returns the value of attribute id. 
- 
  
    
      #lastname  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Returns the value of attribute lastname. 
- 
  
    
      #own_team_id  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Returns the value of attribute own_team_id. 
- 
  
    
      #role  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Returns the value of attribute role. 
- 
  
    
      #role_id  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Returns the value of attribute role_id. 
- 
  
    
      #teams  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Returns the value of attribute teams. 
- 
  
    
      #updated_at  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Returns the value of attribute updated_at. 
- 
  
    
      #username  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Returns the value of attribute username. 
Instance Method Summary collapse
- 
  
    
      #initialize(params = {})  ⇒ User 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    A new instance of User. 
Constructor Details
#initialize(params = {}) ⇒ User
Returns a new instance of User.
| 17 18 19 20 21 22 23 24 25 26 27 | # File 'lib/strawberry_api/user.rb', line 17 def initialize(params = {}) params.each do |k, v| if k == 'teams' v.map! do |team| Team.new(team) end end instance_variable_set("@#{k.gsub(/[!@#$%^&*?']/, '')}", v) unless v.nil? end end | 
Instance Attribute Details
#authentication_token ⇒ Object
Returns the value of attribute authentication_token.
| 7 8 9 | # File 'lib/strawberry_api/user.rb', line 7 def authentication_token @authentication_token end | 
#created_at ⇒ Object
Returns the value of attribute created_at.
| 8 9 10 | # File 'lib/strawberry_api/user.rb', line 8 def created_at @created_at end | 
#firstname ⇒ Object
Returns the value of attribute firstname.
| 10 11 12 | # File 'lib/strawberry_api/user.rb', line 10 def firstname @firstname end | 
#id ⇒ Object
Returns the value of attribute id.
| 5 6 7 | # File 'lib/strawberry_api/user.rb', line 5 def id @id end | 
#lastname ⇒ Object
Returns the value of attribute lastname.
| 11 12 13 | # File 'lib/strawberry_api/user.rb', line 11 def lastname @lastname end | 
#own_team_id ⇒ Object
Returns the value of attribute own_team_id.
| 12 13 14 | # File 'lib/strawberry_api/user.rb', line 12 def own_team_id @own_team_id end | 
#role ⇒ Object
Returns the value of attribute role.
| 14 15 16 | # File 'lib/strawberry_api/user.rb', line 14 def role @role end | 
#role_id ⇒ Object
Returns the value of attribute role_id.
| 13 14 15 | # File 'lib/strawberry_api/user.rb', line 13 def role_id @role_id end | 
#teams ⇒ Object
Returns the value of attribute teams.
| 15 16 17 | # File 'lib/strawberry_api/user.rb', line 15 def teams @teams end | 
#updated_at ⇒ Object
Returns the value of attribute updated_at.
| 9 10 11 | # File 'lib/strawberry_api/user.rb', line 9 def updated_at @updated_at end | 
#username ⇒ Object
Returns the value of attribute username.
| 6 7 8 | # File 'lib/strawberry_api/user.rb', line 6 def username @username end |