diff --git a/lib/mutter.rb b/lib/mutter.rb index 18db76e..649b158 100644 --- a/lib/mutter.rb +++ b/lib/mutter.rb @@ -51,6 +51,10 @@ def self.stylize *args new.stylize *args end + def self.process *args + new.process *args + end + def self.new *args Mutterer.new(*args) end diff --git a/lib/mutter/mutterer.rb b/lib/mutter/mutterer.rb index a5eb71c..e36b847 100644 --- a/lib/mutter/mutterer.rb +++ b/lib/mutter/mutterer.rb @@ -44,12 +44,13 @@ def styles def clear opt = :all case opt - when :user then @styles = {} - when :default then @defaults = {} - when :styles then @styles, @defaults = {}, {} - when :active then @active = [] - when :all then @active, @styles, @defaults = [], {}, {} - else raise ArgumentError, "[:user, :default, :active, :all] only" + when :user then @styles = {} + when :styles then @styles, @defaults = {}, {} + when :active then @active = [] + when :all then @active, @styles, @defaults = [], {}, {} + when :default, + :defaults then @defaults = {} + else raise ArgumentError, "[:user, :default, :active, :all] only" end self end