class Learndot::LearningComponents
Public Class Methods
new(api)
click to toggle source
# File lib/learndot/learning_components.rb, line 2 def initialize(api) @api = api end
Public Instance Methods
create_component(conditions)
click to toggle source
# File lib/learndot/learning_components.rb, line 10 def create_component(conditions) @api.create(:content_component, conditions) end
retrieve_component(conditions, options = {orderBy: 'Name', asc: true})
click to toggle source
# File lib/learndot/learning_components.rb, line 6 def retrieve_component(conditions, options = {orderBy: 'Name', asc: true}) learning_component = @api.search(:content_component, conditions, options) end
update_component(component_id, conditions={})
click to toggle source
# File lib/learndot/learning_components.rb, line 14 def update_component(component_id, conditions={}) @api.update(:content_component, conditions, component_id) end