Module: Termin::ANSIColor::RGBColorMetrics
- Defined in:
- lib/termin/ansicolor/rgb_color_metrics.rb
Defined Under Namespace
Modules: CIELab, CIEXYZ, CompuPhase, Euclidean, NTSC, YUV
Class Method Summary
collapse
Class Method Details
.metric(name) ⇒ Object
37
38
39
|
# File 'lib/termin/ansicolor/rgb_color_metrics.rb', line 37
def self.metric(name)
metric?(name) or raise ArgumentError, "unknown metric #{name.inspect}"
end
|
.metric?(name) ⇒ Boolean
41
42
43
44
45
|
# File 'lib/termin/ansicolor/rgb_color_metrics.rb', line 41
def self.metric?(name)
if const_defined?(name)
const_get name
end
end
|
.metrics ⇒ Object
47
48
49
|
# File 'lib/termin/ansicolor/rgb_color_metrics.rb', line 47
def self.metrics
constants.map(&:to_sym)
end
|