Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/bugzyrb.rb

Instance Method Summary collapse

Instance Method Details

#to_sObject



33
34
35
36
37
38
39
40
41
42
43
# File 'lib/bugzyrb.rb', line 33

def to_s
  str = self.to_s_orig
  if ::ELIMINATE_ANSI_ESCAPE
    str = str.sub(/^\e\[[\[\e0-9;m]+m/, "")
    str = str.sub(/(\e\[[\[\e0-9;m]+m)$/, "")
    # Above works for only one, beg or eol
    str = str.gsub(/\e\[[\[\e0-9;m]+m/, "")
    #str = str.gsub(/(\e\[[\[\e0-9;m]+m)/, "")
  end
  str
end

#to_s_origObject



32
# File 'lib/bugzyrb.rb', line 32

alias_method :to_s_orig, :to_s