module Enlight module Models class Course < Enlight::Models::Model attr_accessor :external_id attr_accessor :name attr_accessor :available_instructor_led attr_accessor :available_self_paced attr_accessor :organization_id attr_accessor :organization_name attr_accessor :content_provider_id attr_accessor :content_provider_name attr_accessor :activites attr_accessor :tags attr_accessor :custom_fields alias_method :activities, :activites def activites=(value) if value.instance_of?(Array) && value.any? @activites = [] value.each {|v| @activites.append(Enlight::Models::CourseActivity.new(v))} else @activites = nil end end def custom_fields=(value) if value.instance_of?(Array) && value.any? @custom_fields = [] value.each {|v| @custom_fields.append(Enlight::Models::CustomField.new(v))} else @custom_fields = nil end end end end end