diff options
author | Abinoam P. Marques Jr <abinoam@gmail.com> | 2017-09-24 23:03:21 -0300 |
---|---|---|
committer | Abinoam P. Marques Jr <abinoam@gmail.com> | 2017-09-25 06:51:00 -0300 |
commit | 32df1901c7220bf54832fcf14856406beea2fe7e (patch) | |
tree | 84c5a4f4c2e59faad6ca83043df015a437ff000e /lib | |
parent | 8a8df658f6ef233ff3a75de2f9e989c942cd0c05 (diff) | |
download | highline-32df1901c7220bf54832fcf14856406beea2fe7e.tar.gz |
Add meaningful heredoc delimiters
Diffstat (limited to 'lib')
-rw-r--r-- | lib/highline/string_extensions.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/highline/string_extensions.rb b/lib/highline/string_extensions.rb index 521c4e4..f6c4c6b 100644 --- a/lib/highline/string_extensions.rb +++ b/lib/highline/string_extensions.rb @@ -96,28 +96,28 @@ class HighLine #:nodoc: def self.define_builtin_style_methods(base) HighLine::COLORS.each do |color| color = color.downcase - base.class_eval <<-END + base.class_eval <<-METHOD_DEFINITION undef :#{color} if method_defined? :#{color} def #{color} color(:#{color}) end - END + METHOD_DEFINITION - base.class_eval <<-END + base.class_eval <<-METHOD_DEFINITION undef :on_#{color} if method_defined? :on_#{color} def on_#{color} on(:#{color}) end - END + METHOD_DEFINITION HighLine::STYLES.each do |style| style = style.downcase - base.class_eval <<-END + base.class_eval <<-METHOD_DEFINITION undef :#{style} if method_defined? :#{style} def #{style} color(:#{style}) end - END + METHOD_DEFINITION end end end |