Class: Liza::System
Direct Known Subclasses
ArtSystem, CryptoSystem, DeepSystem, DeskSystem, DevSystem, EcoSystem, HappySystem, LabSystem, MediaSystem, MicroSystem, NetSystem, PrimeSystem, WebSystem, WorkSystem
Class Method Summary collapse
- .box ⇒ Object
-
.color(color = nil) ⇒ Object
COLOR.
- .const(name) ⇒ Object
-
.panel(name) ⇒ Object
Adds a subsystem to the system.
- .subs ⇒ Object
- .subsystems ⇒ Object
-
.system ⇒ Object
SYSTEM.
- .token ⇒ Object
Methods inherited from Unit
_erbs_for, add, #add, #cl, cl, class_methods_defined, const_added, const_missing, constants_defined, define_error, descendants_select, division, erbs_available, erbs_defined, erbs_for, errors, #fetch, fetch, get, #get, instance_methods_defined, log, #log, log?, #log?, log_array, #log_array, #log_hash, log_hash, #log_level, log_level, log_level?, #log_level?, log_levels, #log_levels, #log_render_convert, #log_render_format, #log_render_in, #log_render_out, method_added, methods_defined, namespace, part, raise_error, #raise_error, reload!, #reload!, #render, #render!, #render_stack, renderable_formats_for, renderable_names, section, sections, #set, set, #settings, settings, singleton_method_added, sleep, #sleep, stick, #stick, sticks, #sticks, subclasses_select, subunits, #system, system?, test_class, time_diff, #time_diff
Class Method Details
.box ⇒ Object
29 30 31 32 33 34 |
# File 'lib/liza/systemic_units/system.rb', line 29 def self.box return @box if @box ret = const "#{token}_box" @box = ret unless App.coding? ret end |
.color(color = nil) ⇒ Object
COLOR
44 45 46 47 48 49 50 |
# File 'lib/liza/systemic_units/system.rb', line 44 def self.color color = nil if color @color = color else @color end end |
.const(name) ⇒ Object
3 4 5 |
# File 'lib/liza/systemic_units/system.rb', line 3 def self.const name const_get name.to_s.camelize end |
.panel(name) ⇒ Object
Adds a subsystem to the system
21 22 23 |
# File 'lib/liza/systemic_units/system.rb', line 21 def self.panel name subs << name end |
.subs ⇒ Object
9 10 11 |
# File 'lib/liza/systemic_units/system.rb', line 9 def self.subs @subs ||= [] end |
.subsystems ⇒ Object
13 14 15 16 17 18 |
# File 'lib/liza/systemic_units/system.rb', line 13 def self.subsystems return @subsystems if @subsystems ret = subs.map { [_1, const(_1)] }.to_h @subsystems = ret unless App.coding? ret end |
.system ⇒ Object
SYSTEM
38 39 40 |
# File 'lib/liza/systemic_units/system.rb', line 38 def self.system self end |
.token ⇒ Object
25 26 27 |
# File 'lib/liza/systemic_units/system.rb', line 25 def self.token @token ||= name.gsub(/System$/, '').snakecase.to_sym end |