Class: String

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

Instance Method Summary collapse

Instance Method Details

#colorize(color) ⇒ Object



4
5
6
# File 'lib/colorls/monkeys.rb', line 4

def colorize(color)
  self.color(color.to_sym)
end

#remove(pattern) ⇒ Object



8
9
10
# File 'lib/colorls/monkeys.rb', line 8

def remove(pattern)
  gsub(pattern, '')
end

#uniqObject



12
13
14
# File 'lib/colorls/monkeys.rb', line 12

def uniq
  split('').uniq.join
end