Class: Liza::Box
Direct Known Subclasses
ArtSystem::ArtBox, CryptoSystem::CryptoBox, DeepSystem::DeepBox, DeskSystem::DeskBox, DevSystem::DevBox, HappySystem::HappyBox, LabSystem::LabBox, MicroSystem::MicroBox, NetSystem::NetBox, WebSystem::WebBox, WorkSystem::WorkBox
Class Method Summary
collapse
Methods inherited from Unit
const_missing, division, part, system, #system, test_class
Class Method Details
.[](symbol) ⇒ Object
7
8
9
|
# File 'lib/liza/meta/box.rb', line 7
def self.[] symbol
panels[symbol].started
end
|
.color ⇒ Object
21
22
23
|
# File 'lib/liza/meta/box.rb', line 21
def self.color
system.color
end
|
11
12
13
14
15
16
17
|
# File 'lib/liza/meta/box.rb', line 11
def self.configure name, &block
raise ArgumentError, "block required" unless block_given?
raise ArgumentError, "Invalid panel: #{name}. Valid panels are: #{system.subs}" unless system.subs.include? name
panel = panels[name] ||= Liza.const("#{name}_panel").new name
panel.push block
end
|
.panels ⇒ Object
3
4
5
|
# File 'lib/liza/meta/box.rb', line 3
def self.panels
fetch(:panels) { {} }
end
|