Module: TermNote::Pane

Included in:
Chapter, Code, Console, Text
Defined in:
lib/termnote/pane.rb,
lib/termnote/pane/code.rb,
lib/termnote/pane/text.rb,
lib/termnote/pane/chapter.rb,
lib/termnote/pane/console.rb,
lib/termnote/pane/helpers.rb,
lib/termnote/pane/helpers/title.rb,
lib/termnote/pane/helpers/content.rb

Defined Under Namespace

Modules: Helpers Classes: Chapter, Code, Console, Text

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#heightObject

Returns the value of attribute height.



9
10
11
# File 'lib/termnote/pane.rb', line 9

def height
  @height
end

#rowsObject

Returns the value of attribute rows.



9
10
11
# File 'lib/termnote/pane.rb', line 9

def rows
  @rows
end

#showObject

Returns the value of attribute show.



9
10
11
# File 'lib/termnote/pane.rb', line 9

def show
  @show
end

#widthObject

Returns the value of attribute width.



9
10
11
# File 'lib/termnote/pane.rb', line 9

def width
  @width
end

Instance Method Details

#call(window_size) ⇒ Object



11
12
13
14
15
16
17
# File 'lib/termnote/pane.rb', line 11

def call(window_size)
  window_height, window_width = window_size
  @width = window_width
  @height = window_height
  clear
  render
end