Class: PnoteClient::Documents::Pnote::Practice

Inherits:
Problem
  • Object
show all
Defined in:
lib/pnote_client/documents/pnote/practice.rb

Instance Attribute Summary collapse

Attributes inherited from Problem

#explaination, #question

Instance Method Summary collapse

Methods inherited from Problem

#add_answer_line, #add_choice_line, #add_explaination_line, #add_question_line, #answer, #choices

Methods included from Utils::StringUtil

#add_line

Constructor Details

#initializePractice

Returns a new instance of Practice.



9
10
11
12
13
# File 'lib/pnote_client/documents/pnote/practice.rb', line 9

def initialize
  super
  @teacher_comments = []
  @tip = nil
end

Instance Attribute Details

#teacher_commentsObject

Returns the value of attribute teacher_comments.



7
8
9
# File 'lib/pnote_client/documents/pnote/practice.rb', line 7

def teacher_comments
  @teacher_comments
end

#tipObject

Returns the value of attribute tip.



7
8
9
# File 'lib/pnote_client/documents/pnote/practice.rb', line 7

def tip
  @tip
end

Instance Method Details

#add_teacher_comment(new_teacher_comment) ⇒ Object



15
16
17
# File 'lib/pnote_client/documents/pnote/practice.rb', line 15

def add_teacher_comment(new_teacher_comment)
  @teacher_comments << new_teacher_comment
end

#add_tip_line(new_line) ⇒ Object



19
20
21
# File 'lib/pnote_client/documents/pnote/practice.rb', line 19

def add_tip_line(new_line)
  @tip = add_line(@tip, new_line)
end