Sha256: cd2e456bc79a48beb8b7fc026139aca0ff57721f9272c6b93fb17d66033b93f1

Contents?: true

Size: 529 Bytes

Versions: 98

Compression:

Stored size: 529 Bytes

Contents

module ANSI

  require 'ansi/chart'

  # Converts {CHART} and {SPECIAL_CHART} entries into constants.
  # So for example, the CHART entry for :red becomes:
  #
  #   ANSI::Constants::RED  #=> "\e[31m"
  #
  # The ANSI Constants are include into ANSI::Code and can be included
  # any where will they would be of use.
  #
  module Constants

    CHART.each do |name, code|
      const_set(name.to_s.upcase, "\e[#{code}m")
    end

    SPECIAL_CHART.each do |name, code|
      const_set(name.to_s.upcase, code)
    end

  end

end

Version data entries

98 entries across 56 versions & 17 rubygems

Version Path
op_connect-0.1.2 vendor/bundle/ruby/3.1.0/gems/ansi-1.5.0/lib/ansi/constants.rb
paynow_sdk-1.1.0 vendor/bundle/ruby/2.7.0/gems/ansi-1.5.0/lib/ansi/constants.rb
paynow_sdk-1.1.0 vendor/cache/ruby/2.7.0/gems/ansi-1.5.0/lib/ansi/constants.rb
paynow_sdk-1.1.0 vendor/bundle/ruby/2.7.0/gems/paynow_sdk-1.0.9/vendor/cache/ruby/2.7.0/gems/paynow_sdk-1.0.0/vendor/cache/ruby/2.7.0/gems/ansi-1.5.0/lib/ansi/constants.rb
paynow_sdk-1.1.0 vendor/cache/ruby/2.7.0/gems/paynow_sdk-1.0.0/vendor/cache/ruby/2.7.0/gems/ansi-1.5.0/lib/ansi/constants.rb
paynow_sdk-1.1.0 vendor/bundle/ruby/2.7.0/gems/paynow_sdk-1.0.9/vendor/bundle/ruby/2.7.0/gems/ansi-1.5.0/lib/ansi/constants.rb
paynow_sdk-1.1.0 vendor/bundle/ruby/2.7.0/gems/paynow_sdk-1.0.9/vendor/cache/ruby/2.7.0/gems/ansi-1.5.0/lib/ansi/constants.rb
paynow_sdk-1.0.9 vendor/cache/ruby/2.7.0/gems/paynow_sdk-1.0.0/vendor/cache/ruby/2.7.0/gems/ansi-1.5.0/lib/ansi/constants.rb
paynow_sdk-1.0.9 vendor/bundle/ruby/2.7.0/gems/ansi-1.5.0/lib/ansi/constants.rb
paynow_sdk-1.0.9 vendor/cache/ruby/2.7.0/gems/ansi-1.5.0/lib/ansi/constants.rb
paynow_sdk-1.0.8 vendor/bundle/ruby/2.7.0/gems/ansi-1.5.0/lib/ansi/constants.rb
paynow_sdk-1.0.8 vendor/cache/ruby/2.7.0/gems/ansi-1.5.0/lib/ansi/constants.rb
paynow_sdk-1.0.8 vendor/cache/ruby/2.7.0/gems/paynow_sdk-1.0.0/vendor/cache/ruby/2.7.0/gems/ansi-1.5.0/lib/ansi/constants.rb
grape-extra_validators-2.0.0 vendor/bundle/ruby/2.6.0/gems/ansi-1.5.0/lib/ansi/constants.rb
paynow_sdk-1.0.7 vendor/cache/ruby/2.7.0/gems/paynow_sdk-1.0.0/vendor/cache/ruby/2.7.0/gems/ansi-1.5.0/lib/ansi/constants.rb
paynow_sdk-1.0.7 vendor/cache/ruby/2.7.0/gems/ansi-1.5.0/lib/ansi/constants.rb
paynow_sdk-1.0.6 vendor/cache/ruby/2.7.0/gems/ansi-1.5.0/lib/ansi/constants.rb
paynow_sdk-1.0.6 vendor/cache/ruby/2.7.0/gems/paynow_sdk-1.0.0/vendor/cache/ruby/2.7.0/gems/ansi-1.5.0/lib/ansi/constants.rb
paynow_sdk-1.0.5 vendor/cache/ruby/2.7.0/gems/ansi-1.5.0/lib/ansi/constants.rb
paynow_sdk-1.0.5 vendor/cache/ruby/2.7.0/gems/paynow_sdk-1.0.0/vendor/cache/ruby/2.7.0/gems/ansi-1.5.0/lib/ansi/constants.rb