Class: String

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

Instance Method Summary collapse

Instance Method Details

#path_for_osObject


18
19
20
# File 'lib/monkey_patches.rb', line 18

def path_for_os
  WINDOWS ? self.gsub('/', '\\') : self
end

#redObject


13
14
15
16
# File 'lib/monkey_patches.rb', line 13

def red
  return self if WINDOWS
  "\e[31m#{self}\e[0m"
end