Class: TinCanApi::StatementsResult

Inherits:
Object
  • Object
show all
Defined in:
lib/tin_can_api/statements_result.rb

Overview

Statements result model class, returned by LRS calls to get multiple statements

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ StatementsResult

Returns a new instance of StatementsResult.



8
9
10
11
12
13
14
15
# File 'lib/tin_can_api/statements_result.rb', line 8

def initialize(options={})
  json = options.fetch(:json, nil)
  self.statements = []
  if json
    self.statements = json['statements'].map {|statement| Statement.new(json: statement)} if json['statements']
    self.more_url = json['more'] if json['more']
  end
end

Instance Attribute Details

#more_urlObject

Returns the value of attribute more_url.



6
7
8
# File 'lib/tin_can_api/statements_result.rb', line 6

def more_url
  @more_url
end

#statementsObject

Returns the value of attribute statements.



6
7
8
# File 'lib/tin_can_api/statements_result.rb', line 6

def statements
  @statements
end