Class: TermNote::Pane::Chapter

Inherits:
Object
  • Object
show all
Includes:
TermNote::Pane, Helpers::Title
Defined in:
lib/termnote/pane/chapter.rb

Instance Attribute Summary collapse

Attributes included from TermNote::Pane

#height, #show, #width

Instance Method Summary collapse

Methods included from TermNote::Pane

#call

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(options)
  @title = options[:title] || options['title']
  @subtitle = options[:subtitle] || options['subtitle']
end

Instance Attribute Details

#subtitleObject

Returns the value of attribute subtitle.



7
8
9
# File 'lib/termnote/pane/chapter.rb', line 7

def subtitle
  @subtitle
end

#titleObject

Returns the value of attribute title.



7
8
9
# File 'lib/termnote/pane/chapter.rb', line 7

def title
  @title
end

Instance Method Details

#rowsObject



14
15
16
# File 'lib/termnote/pane/chapter.rb', line 14

def rows
  subtitle ? title_row + subtitle_row : title_row
end