Skip to content

Commit

Permalink
Merge pull request #199 from fazibear/fix-colorize
Browse files Browse the repository at this point in the history
Use colorize dedicated method for color and modes
  • Loading branch information
leehambley committed Dec 16, 2014
2 parents 533c70c + 1905283 commit db4d1d3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/sshkit/color.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require 'colorize'

module Color
String::COLORS.each_pair do |color, _|
String.colors.each do |color|
instance_eval <<-RUBY, __FILE__, __LINE__
def #{color}(string = '')
string = yield if block_given?
Expand All @@ -10,7 +10,7 @@ def #{color}(string = '')
RUBY
end

String::MODES.each_pair do |mode, _|
String.modes.each do |mode|
instance_eval <<-RUBY, __FILE__, __LINE__
def #{mode}(string = '')
string = yield if block_given?
Expand Down

0 comments on commit db4d1d3

Please sign in to comment.