Module: Assistable

Extended by:
ActiveSupport::Concern
Included in:
Exercise
Defined in:
app/models/concerns/assistable.rb

Instance Method Summary collapse

Instance Method Details

#assist_with(assignment) ⇒ Object



13
14
15
16
17
# File 'app/models/concerns/assistable.rb', line 13

def assist_with(assignment)
  # not strictly necessary, but avoid going through
  # all the assistence process when there are no rules
  assistance_rules.blank? ? [] : assistant.assist_with(assignment)
end

#assistantObject



9
10
11
# File 'app/models/concerns/assistable.rb', line 9

def assistant
  Mumukit::Assistant.parse(assistance_rules)
end