class Mvn2::ColorTypes
Constants
- DEFAULT_COLOR_OPTS
Public Class Methods
def_color()
click to toggle source
# File lib/mvn2/plugin.rb, line 170 def self.def_color register_type(:color_override) { |list| options = Plugins.get_var :options opts = DEFAULT_COLOR_OPTS list.sort_by { |v| -v[:options][:priority] }.each { |item| rval = item[:block].call(options) unless rval.nil? || !rval opts = rval break end } opts.each { |opt| Format.color_profile opt[0], fgcolor: opt[1][:fg], bgcolor: opt[1][:bg] } } end