Skip to content

Commit

Permalink
do not use puts inside display
Browse files Browse the repository at this point in the history
  • Loading branch information
azi-acceis committed Feb 15, 2024
1 parent fcb7594 commit 50a2f9d
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions lib/unisec/versions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,19 +72,19 @@ def self.versions # rubocop:disable Metrics/MethodLength
# # …
def self.display # rubocop:disable Metrics/AbcSize
data = versions
display = ->(node) { puts Paint[data[node][:label], :red, :bold].ljust(44) + " #{data[node][:version]}" }
puts Paint['Unicode:', :underline]
display.call(:ruby_unicode)
display.call(:twittercldr_unicode)
display.call(:unicodeconfusable_unicode)
display.call(:twittercldr_icu)
display.call(:twittercldr_cldr)
display.call(:ruby_unicode_emoji)
display.call(:ucd_derivedname)
puts Paint["\nGems:", :underline]
display.call(:unisec)
display.call(:twittercldr)
display.call(:unicodeconfusable)
colorize = ->(node) { Paint[data[node][:label], :red, :bold].ljust(44) + " #{data[node][:version]}\n" }
Paint["Unicode:\n", :underline] +
colorize.call(:ruby_unicode) +
colorize.call(:twittercldr_unicode) +
colorize.call(:unicodeconfusable_unicode) +
colorize.call(:twittercldr_icu) +
colorize.call(:twittercldr_cldr) +
colorize.call(:ruby_unicode_emoji) +
colorize.call(:ucd_derivedname) +
Paint["\nGems:\n", :underline] +
colorize.call(:unisec) +
colorize.call(:twittercldr) +
colorize.call(:unicodeconfusable)
end
end
end

0 comments on commit 50a2f9d

Please sign in to comment.