Class: Enlight::Responses::SearchClassEnrollments

Inherits:
Response
  • Object
show all
Includes:
Pageable
Defined in:
lib/enlight/responses/search_class_enrollments.rb

Instance Attribute Summary

Attributes included from Pageable

#results, #total_count, #total_pages

Attributes inherited from Response

#error, #status

Instance Method Summary collapse

Methods inherited from Response

#initialize

Constructor Details

This class inherits a constructor from Enlight::Responses::Response

Instance Method Details

#class_enrollment_search_results=(value) ⇒ Object

TODO double check if LOD actually passes this value instead of results.. documentation might be wrong



7
8
9
# File 'lib/enlight/responses/search_class_enrollments.rb', line 7

def class_enrollment_search_results=(value)
  results = value
end

#results=(value) ⇒ Object



11
12
13
14
15
16
17
18
# File 'lib/enlight/responses/search_class_enrollments.rb', line 11

def results=(value)
  if value.instance_of?(Array) && value.any?
    @results = []
    value.each {|v| @results.append(Enlight::Models::ClassEnrollment.new(v))}
  else
    @results = nil
  end
end