Class: String

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

Instance Method Summary collapse

Instance Method Details

#to_sObject



30
31
32
33
34
35
36
37
38
39
40
# File 'lib/bugzyrb.rb', line 30

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



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

alias_method :to_s_orig, :to_s