Class: Salticid::Interface::View
- Includes:
- Resizeable
- Defined in:
- lib/salticid/interface/view.rb
Instance Attribute Summary collapse
-
#height ⇒ Object
Returns the value of attribute height.
-
#left ⇒ Object
Returns the value of attribute left.
-
#top ⇒ Object
Returns the value of attribute top.
-
#width ⇒ Object
Returns the value of attribute width.
-
#window ⇒ Object
Returns the value of attribute window.
Instance Method Summary collapse
- #hide ⇒ Object
-
#initialize(interface, params = {}) ⇒ View
constructor
A new instance of View.
- #show ⇒ Object
Methods included from Resizeable
Constructor Details
#initialize(interface, params = {}) ⇒ View
Returns a new instance of View.
8 9 10 11 12 13 14 15 16 |
# File 'lib/salticid/interface/view.rb', line 8 def initialize(interface, params = {}) @interface = interface @height = params[:height] || Curses.lines @width = params[:width] || Curses.cols @top = params[:top] || 0 @left = params[:left] || 0 @window = Curses::Window.new @height, @width, @top, @left end |
Instance Attribute Details
#height ⇒ Object
Returns the value of attribute height.
6 7 8 |
# File 'lib/salticid/interface/view.rb', line 6 def height @height end |
#left ⇒ Object
Returns the value of attribute left.
6 7 8 |
# File 'lib/salticid/interface/view.rb', line 6 def left @left end |
#top ⇒ Object
Returns the value of attribute top.
6 7 8 |
# File 'lib/salticid/interface/view.rb', line 6 def top @top end |
#width ⇒ Object
Returns the value of attribute width.
6 7 8 |
# File 'lib/salticid/interface/view.rb', line 6 def width @width end |
#window ⇒ Object
Returns the value of attribute window.
6 7 8 |
# File 'lib/salticid/interface/view.rb', line 6 def window @window end |