Class: PnoteClient::Documents::Pnote::SubChapter
- Inherits:
-
Object
- Object
- PnoteClient::Documents::Pnote::SubChapter
- Defined in:
- lib/pnote_client/documents/pnote/sub_chapter.rb
Instance Attribute Summary collapse
-
#concepts ⇒ Object
readonly
Returns the value of attribute concepts.
-
#exercises ⇒ Object
readonly
Returns the value of attribute exercises.
-
#practices ⇒ Object
readonly
Returns the value of attribute practices.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
Instance Method Summary collapse
- #add_concept(new_concept) ⇒ Object
- #add_exercise(new_exercise) ⇒ Object
- #add_practice(new_practice) ⇒ Object
-
#initialize(title: nil) ⇒ SubChapter
constructor
A new instance of SubChapter.
- #set_title(title) ⇒ Object
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
#concepts ⇒ Object (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 |
#exercises ⇒ Object (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 |
#practices ⇒ Object (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 |
#title ⇒ Object (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 |