Class: Hockey::User

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

Overview

User on HockeyApp

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hashobj, networking) ⇒ User


20
21
22
23
24
25
26
27
28
29
# File 'lib/hockeyhelper/user.rb', line 20

def initialize(hashobj, networking)
  @role = hashobj['role']
  @id = hashobj['id']
  @user_id = hashobj['user_id']
  @full_name = hashobj['full_name']
  @email = hashobj['email']
  @invited_at = hashobj['invited_at']
  @original_hash = hashobj
  @net = networking
end

Instance Attribute Details

#emailObject (readonly)

Returns the value of attribute email


10
11
12
# File 'lib/hockeyhelper/user.rb', line 10

def email
  @email
end

#full_nameObject (readonly)

Returns the value of attribute full_name


9
10
11
# File 'lib/hockeyhelper/user.rb', line 9

def full_name
  @full_name
end

#idObject (readonly)

Returns the value of attribute id


7
8
9
# File 'lib/hockeyhelper/user.rb', line 7

def id
  @id
end

#invited_atObject (readonly)

Returns the value of attribute invited_at


11
12
13
# File 'lib/hockeyhelper/user.rb', line 11

def invited_at
  @invited_at
end

#netObject (readonly)

Returns the value of attribute net


14
15
16
# File 'lib/hockeyhelper/user.rb', line 14

def net
  @net
end

#original_hashObject (readonly)

Returns the value of attribute original_hash


12
13
14
# File 'lib/hockeyhelper/user.rb', line 12

def original_hash
  @original_hash
end

#roleObject (readonly)

Returns the value of attribute role


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

def role
  @role
end

#user_idObject (readonly)

Returns the value of attribute user_id


8
9
10
# File 'lib/hockeyhelper/user.rb', line 8

def user_id
  @user_id
end

Class Method Details

.create_from(hashobj, networking) ⇒ Object


16
17
18
# File 'lib/hockeyhelper/user.rb', line 16

def self.create_from(hashobj, networking)
  self.new hashobj, networking
end

Instance Method Details

#inspectObject Also known as: to_s


31
32
33
# File 'lib/hockeyhelper/user.rb', line 31

def inspect
  "#{@user_id}, #{@full_name}, #{@email}"
end