class String

Public Instance Methods

bold() click to toggle source

Returns a copy of this string with terminal escapes to bold it

# File lib/buckler/strings.rb, line 4
def bold
  "\033[1m#{self}\e[0m"
end
bucketize(color = :orange) click to toggle source

Returns a copy of this string with terminal escapes to make it a color Options: `:orange` or `:pink`

# File lib/buckler/strings.rb, line 15
def bucketize(color = :orange)
  case color
  when :pink
    "\e[38;5;206m#{self}\e[0m"
  else
    "\e[38;5;208m#{self}\e[0m"
  end
end
dangerize() click to toggle source

Returns a copy of this string with terminal escapes to make it red

# File lib/buckler/strings.rb, line 9
def dangerize
  "\e[38;5;196m#{self}\e[0m"
end