Class: TermNote::Pane::Chapter
- Inherits:
-
Object
- Object
- TermNote::Pane::Chapter
- Includes:
- TermNote::Pane, Helpers::Title
- Defined in:
- lib/termnote/pane/chapter.rb
Instance Attribute Summary collapse
-
#subtitle ⇒ Object
Returns the value of attribute subtitle.
-
#title ⇒ Object
Returns the value of attribute title.
Attributes included from TermNote::Pane
Instance Method Summary collapse
-
#initialize(options) ⇒ Chapter
constructor
A new instance of Chapter.
- #rows ⇒ Object
Methods included from TermNote::Pane
Constructor Details
#initialize(options) ⇒ Chapter
Returns a new instance of Chapter.
9 10 11 12 |
# File 'lib/termnote/pane/chapter.rb', line 9 def initialize() @title = [:title] || ['title'] @subtitle = [:subtitle] || ['subtitle'] end |
Instance Attribute Details
#subtitle ⇒ Object
Returns the value of attribute subtitle.
7 8 9 |
# File 'lib/termnote/pane/chapter.rb', line 7 def subtitle @subtitle end |
#title ⇒ Object
Returns the value of attribute title.
7 8 9 |
# File 'lib/termnote/pane/chapter.rb', line 7 def title @title end |
Instance Method Details
#rows ⇒ Object
14 15 16 |
# File 'lib/termnote/pane/chapter.rb', line 14 def rows subtitle ? title_row + subtitle_row : title_row end |