Class: PnoteClient::Documents::Pnote::SubChapter

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(title: nil) ⇒ SubChapter

Returns a new instance of SubChapter.



7
8
9
10
11
12
# File 'lib/pnote_client/documents/pnote/sub_chapter.rb', line 7

def initialize(title: nil)
  @title = title
  @concepts = []
  @exercises = []
  @practices = []
end

Instance Attribute Details

#conceptsObject (readonly)

Returns the value of attribute concepts.



5
6
7
# File 'lib/pnote_client/documents/pnote/sub_chapter.rb', line 5

def concepts
  @concepts
end

#exercisesObject (readonly)

Returns the value of attribute exercises.



5
6
7
# File 'lib/pnote_client/documents/pnote/sub_chapter.rb', line 5

def exercises
  @exercises
end

#practicesObject (readonly)

Returns the value of attribute practices.



5
6
7
# File 'lib/pnote_client/documents/pnote/sub_chapter.rb', line 5

def practices
  @practices
end

#titleObject (readonly)

Returns the value of attribute title.



5
6
7
# File 'lib/pnote_client/documents/pnote/sub_chapter.rb', line 5

def title
  @title
end

Instance Method Details

#add_concept(new_concept) ⇒ Object



18
19
20
# File 'lib/pnote_client/documents/pnote/sub_chapter.rb', line 18

def add_concept(new_concept)
  @concepts << new_concept
end

#add_exercise(new_exercise) ⇒ Object



22
23
24
# File 'lib/pnote_client/documents/pnote/sub_chapter.rb', line 22

def add_exercise(new_exercise)
  @exercises << new_exercise
end

#add_practice(new_practice) ⇒ Object



26
27
28
# File 'lib/pnote_client/documents/pnote/sub_chapter.rb', line 26

def add_practice(new_practice)
  @practices << new_practice
end

#set_title(title) ⇒ Object



14
15
16
# File 'lib/pnote_client/documents/pnote/sub_chapter.rb', line 14

def set_title(title)
  @title = title
end