-
-
Save anonymous/34b9b3fc0db5f0a08224b58707eaeb87 to your computer and use it in GitHub Desktop.
Trying some meta programming, and I'm doing something wrong with .send
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def self.sample_colors | |
my_colors = colors | |
# my_colors.each_pair { |k, v| puts "This is " + "\e[#{v}m" + "#{k}" + "\e[0m" } | |
my_colors.each_key { |k| send('k', "This is #{k}.") } | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment