Class: TinCanApi::SubStatement

Inherits:
TinCanApi::Statements::StatementsBase show all
Defined in:
lib/tin_can_api/sub_statement.rb

Instance Attribute Summary collapse

Attributes inherited from TinCanApi::Statements::StatementsBase

#actor, #attachments, #context, #object, #result, #timestamp, #verb, #voided

Instance Method Summary collapse

Constructor Details

#initialize(options = {}, &block) ⇒ SubStatement

Returns a new instance of SubStatement.



7
8
9
10
# File 'lib/tin_can_api/sub_statement.rb', line 7

def initialize(options={}, &block)
  @object_type = 'SubStatement'
  super(options, &block)
end

Instance Attribute Details

#object_typeObject

Returns the value of attribute object_type.



5
6
7
# File 'lib/tin_can_api/sub_statement.rb', line 5

def object_type
  @object_type
end

Instance Method Details

#serialize(version) ⇒ Object



12
13
14
15
16
# File 'lib/tin_can_api/sub_statement.rb', line 12

def serialize(version)
  node = super(version)
  node['objectType'] = object_type
  node
end