Class: DoceboRuby::Course

Inherits:
Resource
  • Object
show all
Defined in:
lib/docebo_ruby/course.rb

Class Method Summary collapse

Methods inherited from Resource

api, api=, fetch_data

Class Method Details

.allObject


6
7
8
9
10
11
# File 'lib/docebo_ruby/course.rb', line 6

def all
  courses = fetch_data('listCourses') do |data|
    data.delete_if { |key, value| key == 'success' }
  end
  courses.map { |key, value| Course.new value['course_info']  }
end