class StrawberryAPI::User

Attributes

authentication_token[RW]
created_at[RW]
firstname[RW]
id[RW]
lastname[RW]
own_team_id[RW]
role[RW]
role_id[RW]
teams[RW]
updated_at[RW]
username[RW]

Public Class Methods

new(params = {}) click to toggle source
# 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