Class: ActivityProvider::LRS::Group
- Defined in:
- lib/activity_provider/lrs/group.rb
Instance Method Summary collapse
- #as_json(*_args) ⇒ Object
-
#initialize(args) ⇒ Group
constructor
A new instance of Group.
Methods inherited from Base
Constructor Details
#initialize(args) ⇒ Group
Returns a new instance of Group.
9 10 11 12 |
# File 'lib/activity_provider/lrs/group.rb', line 9 def initialize(args) @object_type = 'Group' super end |
Instance Method Details
#as_json(*_args) ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/activity_provider/lrs/group.rb', line 14 def as_json(*_args) dumped_hash = { objectType: @object_type } dumped_hash[:name] = @name if @name dumped_hash[:member] = @members if @members && !@members.empty? dumped_hash.merge!(@identifier.as_json) dumped_hash end |