Sha256: d1c8d191270a12cc224c9bc170d9059d3e94b0d9b0b273d06167e18e2eb576fe

Contents?: true

Size: 347 Bytes

Versions: 98

Compression:

Stored size: 347 Bytes

Contents

require 'ansi/code'
require 'ansi/chain'

class ::String

  #
  def ansi(*codes)
    if codes.empty?
      ANSI::Chain.new(self)
    else
      ANSI::Code.ansi(self, *codes)
    end
  end

  #
  def ansi!(*codes)
    replace(ansi(*codes))
  end

  #
  def unansi
    ANSI::Code.unansi(self)
  end

  #
  def unansi!
    replace(unansi)
  end
end

Version data entries

98 entries across 56 versions & 17 rubygems

Version Path
paynow_sdk-1.0.4 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/core.rb
paynow_sdk-1.0.4 vendor/cache/ruby/2.7.0/gems/ansi-1.5.0/lib/ansi/core.rb
paynow_sdk-1.0.3 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/core.rb
paynow_sdk-1.0.3 vendor/cache/ruby/2.7.0/gems/ansi-1.5.0/lib/ansi/core.rb
paynow_sdk-1.0.2 vendor/cache/ruby/2.7.0/gems/ansi-1.5.0/lib/ansi/core.rb
paynow_sdk-1.0.2 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/core.rb
paynow_sdk-1.0.1 vendor/cache/ruby/2.7.0/gems/ansi-1.5.0/lib/ansi/core.rb
paynow_sdk-1.0.1 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/core.rb
paynow_sdk-1.0.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/core.rb
paynow_sdk-1.0.0 vendor/cache/ruby/2.7.0/gems/ansi-1.5.0/lib/ansi/core.rb
paynow_sdk-0.2.0 vendor/cache/ruby/2.7.0/gems/paynow_sdk-0.1.9/vendor/cache/ruby/2.7.0/gems/ansi-1.5.0/lib/ansi/core.rb
paynow_sdk-0.2.0 vendor/cache/ruby/2.7.0/gems/paynow_sdk-0.1.9/vendor/cache/ruby/2.7.0/gems/paynow_sdk-0.1.8/vendor/cache/ruby/2.7.0/gems/ansi-1.5.0/lib/ansi/core.rb
paynow_sdk-0.2.0 vendor/cache/ruby/2.7.0/gems/paynow_sdk-0.1.9/vendor/cache/ruby/2.7.0/gems/paynow_sdk-0.1.8/vendor/cache/ruby/2.7.0/gems/paynow_sdk-0.1.8/vendor/cache/ruby/2.7.0/gems/ansi-1.5.0/lib/ansi/core.rb
paynow_sdk-0.2.0 vendor/cache/ruby/2.7.0/gems/ansi-1.5.0/lib/ansi/core.rb
paynow_sdk-0.2.0 vendor/cache/ruby/2.7.0/gems/paynow_sdk-0.1.8/vendor/cache/ruby/2.7.0/gems/ansi-1.5.0/lib/ansi/core.rb
paynow_sdk-0.2.0 vendor/cache/ruby/2.7.0/gems/paynow_sdk-0.1.8/vendor/cache/ruby/2.7.0/gems/paynow_sdk-0.1.8/vendor/cache/ruby/2.7.0/gems/ansi-1.5.0/lib/ansi/core.rb
paynow_sdk-0.1.9 vendor/cache/ruby/2.7.0/gems/paynow_sdk-0.1.8/vendor/cache/ruby/2.7.0/gems/paynow_sdk-0.1.8/vendor/cache/ruby/2.7.0/gems/ansi-1.5.0/lib/ansi/core.rb
paynow_sdk-0.1.9 vendor/cache/ruby/2.7.0/gems/paynow_sdk-0.1.8/vendor/cache/ruby/2.7.0/gems/ansi-1.5.0/lib/ansi/core.rb
paynow_sdk-0.1.9 vendor/cache/ruby/2.7.0/gems/ansi-1.5.0/lib/ansi/core.rb
josufst_palindrome-0.2.0 vendor/cache/gems/ansi-1.5.0/lib/ansi/core.rb