Class: Liza::System
Direct Known Subclasses
ArtSystem, CryptoSystem, DeepSystem, DeskSystem, DevSystem, HappySystem, LabSystem, MicroSystem, NetSystem, WebSystem, WorkSystem
Class Method Summary
collapse
Methods inherited from Unit
const_missing, division, part, #system, test_class
Class Method Details
.box ⇒ Object
41
42
43
|
# File 'lib/liza/meta/system.rb', line 41
def self.box
@box ||= self.const_get "#{token}_box".camelize
end
|
.color(color = nil) ⇒ Object
53
54
55
56
57
58
59
|
# File 'lib/liza/meta/system.rb', line 53
def self.color color = nil
if color
@color = color
else
@color
end
end
|
.const(name) ⇒ Object
3
4
5
|
# File 'lib/liza/meta/system.rb', line 3
def self.const name
const_get name.to_s.camelize
end
|
.sub(name) ⇒ Object
33
34
35
|
# File 'lib/liza/meta/system.rb', line 33
def self.sub name
subs << name
end
|
.subs ⇒ Object
25
26
27
|
# File 'lib/liza/meta/system.rb', line 25
def self.subs
@subs ||= []
end
|
.subsystems ⇒ Object
29
30
31
|
# File 'lib/liza/meta/system.rb', line 29
def self.subsystems
@subsystems ||= subs.map { const _1 }
end
|
.system ⇒ Object
47
48
49
|
# File 'lib/liza/meta/system.rb', line 47
def self.system
self
end
|
.token ⇒ Object
37
38
39
|
# File 'lib/liza/meta/system.rb', line 37
def self.token
@token ||= name.gsub(/System$/, '').snakecase.to_sym
end
|