class Argyle::Layout::Base

@!attribute [r] areas

@return [Hash{Symbol=>Argyle::Layout::Area}]

@!attribute [r] windows

@return [Hash{Symbol=>Ncurses::WINDOW}]

@!attribute [r] identifier

@return [Symbol]

Attributes

area_prototypes[R]
identifier[R]
areas[R]
windows[R]

Public Class Methods

new(areas, windows) click to toggle source

@param areas [Hash{Symbol=>Argyle::Layout::Area}] @param windows [Hash{Symbol=>Ncurses::WINDOW}] Mapped to the corresponding Area

# File lib/argyle/layout/base.rb, line 16
def initialize(areas, windows)
  @areas = areas
  @windows = windows
end

Protected Class Methods

area(id) click to toggle source

@param id [Symbol]

# File lib/argyle/layout/base.rb, line 31
def area(id)
  area_prototypes[id] = Argyle::Prototype.new(Argyle::Layout::Area, {})
end

Private Class Methods

id(id) click to toggle source

@param id [Symbol]

# File lib/argyle/layout/base.rb, line 39
def id(id)
  @identifier = id
end
inherited(klass) click to toggle source
Calls superclass method
# File lib/argyle/layout/base.rb, line 43
def inherited(klass)
  super

  klass.instance_variable_set('@area_prototypes', area_prototypes || {})

  klass.area(:main)
end