Class: Amun::Windows::Base

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/amun/windows/base.rb

Overview

based on amun object, means it has event manager inside and respond to all event manager methods (bind, undind, trigger…etc) and has a size (Rect instance), it also expose the methods of the size to the public, it also creates a subwindow from the curses standard screen and resizes it whenever you set a new (size) value

Instance Attribute Summary collapse

Attributes inherited from Object

#events

Instance Method Summary collapse

Constructor Details

#initialize(size) ⇒ Base

Returns a new instance of Base.



18
19
20
21
22
# File 'lib/amun/windows/base.rb', line 18

def initialize(size)
  super()
  @size = size
  @curses_window = Curses.stdscr.subwin(height, width, top, left)
end

Instance Attribute Details

#sizeObject

Returns the value of attribute size.



15
16
17
# File 'lib/amun/windows/base.rb', line 15

def size
  @size
end