class ActivityProvider::LRS::LRSObject
Public Class Methods
new(args)
click to toggle source
Calls superclass method
# File lib/activity_provider/lrs/lrs_object.rb, line 14 def initialize(args) super @object_type ||= 'Activity' end
Public Instance Methods
as_json(*_args)
click to toggle source
# File lib/activity_provider/lrs/lrs_object.rb, line 19 def as_json(*_args) validate! dumped_hash = { id: @id, objectType: @object_type } dumped_hash[:definition] = @definition if @definition && !@definition.empty? dumped_hash end