Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
hasumikin committed Oct 14, 2023
1 parent d652fc0 commit 1550519
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions lib/reline/face.rb
Original file line number Diff line number Diff line change
Expand Up @@ -109,17 +109,16 @@ def rgb_expression?(color)
end
end

CONFIGS = {}

private_constant :SGR_PARAMETERS, :Config, :CONFIGS
private_constant :SGR_PARAMETERS, :Config

def self.[](name)
CONFIGS[name]
@configs[name]
end

def self.config(name, override = true, &block)
return if CONFIGS[name] && !override
CONFIGS[name] = Config.new(name, &block)
@configs ||= {}
return if @configs[name] && !override
@configs[name] = Config.new(name, &block)
end

end
Expand Down

0 comments on commit 1550519

Please sign in to comment.