Class: CoderWally::User

Inherits:
Object
  • Object
show all
Defined in:
lib/coder_wally/user.rb

Overview

Stores user properties

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ User

Initialise object with a hash of values



9
10
11
12
13
14
15
# File 'lib/coder_wally/user.rb', line 9

def initialize(data)
  @name = data['name']
  @username = data['username']
  @location = data['location']
  @team = data['team']
  @endorsements = data['endorsements']
end

Instance Attribute Details

#endorsementsObject (readonly)

Object properties



6
7
8
# File 'lib/coder_wally/user.rb', line 6

def endorsements
  @endorsements
end

#locationObject (readonly)

Object properties



6
7
8
# File 'lib/coder_wally/user.rb', line 6

def location
  @location
end

#nameObject (readonly)

Object properties



6
7
8
# File 'lib/coder_wally/user.rb', line 6

def name
  @name
end

#teamObject (readonly)

Object properties



6
7
8
# File 'lib/coder_wally/user.rb', line 6

def team
  @team
end

#usernameObject (readonly)

Object properties



6
7
8
# File 'lib/coder_wally/user.rb', line 6

def username
  @username
end