Class: SDM::User

Inherits:
Object
  • Object
show all
Defined in:
lib/models/porcelain.rb

Overview

A User can connect to resources they are granted directly, or granted via roles.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id: nil, email: nil, first_name: nil, last_name: nil, suspended: nil) ⇒ User

Returns a new instance of User.



421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
# File 'lib/models/porcelain.rb', line 421

def initialize(
	id:nil \
,
	email:nil \
,
	first_name:nil \
,
	last_name:nil \
,
	suspended:nil \
)
	if id != nil
		@id = id
	end
	if email != nil
		@email = email
	end
	if first_name != nil
		@first_name = first_name
	end
	if last_name != nil
		@last_name = last_name
	end
	if suspended != nil
		@suspended = suspended
	end
end

Instance Attribute Details

#emailObject

The User’s email address. Must be unique.



414
415
416
# File 'lib/models/porcelain.rb', line 414

def email
  @email
end

#first_nameObject

The User’s first name.



416
417
418
# File 'lib/models/porcelain.rb', line 416

def first_name
  @first_name
end

#idObject

Unique identifier of the User.



412
413
414
# File 'lib/models/porcelain.rb', line 412

def id
  @id
end

#last_nameObject

The User’s last name.



418
419
420
# File 'lib/models/porcelain.rb', line 418

def last_name
  @last_name
end

#suspendedObject

The User’s suspended state.



420
421
422
# File 'lib/models/porcelain.rb', line 420

def suspended
  @suspended
end