Class: Daigaku::Views::TopBar
- Inherits:
-
Object
- Object
- Daigaku::Views::TopBar
- Includes:
- Curses
- Defined in:
- lib/daigaku/views/top_bar.rb
Constant Summary collapse
- HEIGHT =
4
Instance Attribute Summary collapse
-
#height ⇒ Object
readonly
Returns the value of attribute height.
-
#panel ⇒ Object
readonly
Returns the value of attribute panel.
-
#width ⇒ Object
readonly
Returns the value of attribute width.
Instance Method Summary collapse
-
#initialize(window, text = '') ⇒ TopBar
constructor
A new instance of TopBar.
- #show ⇒ Object
Constructor Details
#initialize(window, text = '') ⇒ TopBar
Returns a new instance of TopBar.
11 12 13 14 15 |
# File 'lib/daigaku/views/top_bar.rb', line 11 def initialize(window, text = '') @height = HEIGHT @width = window.maxx @panel = create_panel(window, @width, @height, text) end |
Instance Attribute Details
#height ⇒ Object (readonly)
Returns the value of attribute height.
9 10 11 |
# File 'lib/daigaku/views/top_bar.rb', line 9 def height @height end |
#panel ⇒ Object (readonly)
Returns the value of attribute panel.
9 10 11 |
# File 'lib/daigaku/views/top_bar.rb', line 9 def panel @panel end |
#width ⇒ Object (readonly)
Returns the value of attribute width.
9 10 11 |
# File 'lib/daigaku/views/top_bar.rb', line 9 def width @width end |
Instance Method Details
#show ⇒ Object
17 18 19 |
# File 'lib/daigaku/views/top_bar.rb', line 17 def show @panel.refresh end |