Class: TinCanApi::StatementsResult
- Inherits:
-
Object
- Object
- TinCanApi::StatementsResult
- 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
-
#more_url ⇒ Object
Returns the value of attribute more_url.
-
#statements ⇒ Object
Returns the value of attribute statements.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ StatementsResult
constructor
A new instance of StatementsResult.
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(={}) json = .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_url ⇒ Object
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 |
#statements ⇒ Object
Returns the value of attribute statements.
6 7 8 |
# File 'lib/tin_can_api/statements_result.rb', line 6 def statements @statements end |