Class: ScormEngine::Models::Learner

Inherits:
Base
  • Object
show all
Defined in:
lib/scorm_engine/models/learner.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Methods inherited from Base

#to_hash

Instance Attribute Details

#first_nameString

The learner's first name.

Returns:

  • (String)

12
13
14
# File 'lib/scorm_engine/models/learner.rb', line 12

def first_name
  @first_name
end

#idString

The external identification of the learner.

Returns:

  • (String)

7
8
9
# File 'lib/scorm_engine/models/learner.rb', line 7

def id
  @id
end

#last_nameString

The learner's last name.

Returns:

  • (String)

17
18
19
# File 'lib/scorm_engine/models/learner.rb', line 17

def last_name
  @last_name
end

Class Method Details

.new_from_api(options = {}) ⇒ Object


19
20
21
22
23
24
25
26
27
28
# File 'lib/scorm_engine/models/learner.rb', line 19

def self.new_from_api(options = {})
  this = new

  this.options = options.dup
  this.id = options["id"]
  this.first_name = options["firstName"]
  this.last_name = options["lastName"]

  this
end