Permalink
Browse files

Nicer config syntax

This change will allow this syntax for configuration.

Tco.configure do |conf|
  conf.names['purple'] = "#622e90"
end
  • Loading branch information...
kwando committed Apr 3, 2014
1 parent ba5c251 commit fb43c50d86700ce12cd4ce138fc14f72adab386c
Showing with 7 additions and 0 deletions.
  1. +7 −0 lib/tco.rb
View
@@ -88,6 +88,13 @@ def self.decorate(string, (fg, bg, bright, underline))
def self.config
@config
end
def self.configure
c = config
yield(c)
reconfigure(c)
c
end
def self.reconfigure(config)
@config = config

0 comments on commit fb43c50

Please sign in to comment.