Class: String

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

Instance Method Summary collapse

Instance Method Details

#blueObject



32
33
34
# File 'lib/twat.rb', line 32

def blue
  "#{self}"
end

#boldObject



40
41
42
# File 'lib/twat.rb', line 40

def bold
  "#{self}"
end

#cyanObject



36
37
38
# File 'lib/twat.rb', line 36

def cyan
  "#{self}"
end

#greenObject



24
25
26
# File 'lib/twat.rb', line 24

def green
  "#{self}"
end

#mentions?(name) ⇒ Boolean

Returns:

  • (Boolean)


44
45
46
# File 'lib/twat.rb', line 44

def mentions?(name)
  return self.downcase.include?(name.to_s.downcase)
end

#redObject

TODO - It’d be nice to implement the colors support here, maybe even only mix this in if it’s enabled?



20
21
22
# File 'lib/twat.rb', line 20

def red
  "#{self}"
end

#yellowObject



28
29
30
# File 'lib/twat.rb', line 28

def yellow
  "#{self}"
end